mirror of
https://github.com/ansible-collections/community.general.git
synced 2025-07-09 14:50:02 -07:00
cloudstack: add check mode tests (#24908)
* cloudstack: test: cs_network_acl: add check_mode tests * cloudstack: test: cs_pod: add check_mode tests * cloudstack: test: cs_user: add check_mode tests * cloudstack: test: cs_sshkeypair: add check_mode tests * cloudstack: test: cs_project: add check_mode tests * cloudstack: test: cs_vpc: add check_mode tests * cloudstack: test: cs_vpn_gateway: add check_mode tests * cloudstack: test: cs_volume: add check_mode tests * cloudstack: test: cs_vmsnapshot: add check_mode tests * cloudstack: test: cs_account: add check_mode tests * cloudstack: test: cs_affinitygroup: add check_mode tests * cloudstack: test: cs_cluster: add check_mode tests * cloudstack: test: cs_domain: add check_mode tests * cloudstack: test: cs_instancegroup: add check_mode tests * cloudstack: test: cs_iso: add check_mode tests * cloudstack: test: cs_loadbalancer_rule: add check_mode tests * cloudstack: test: cs_portforward: add check_mode tests * cloudstack: test: cs_resourcelimit: add check_mode tests * cloudstack: test: cs_securitygroup: add check_mode tests * cloudstack: test: cs_securitygroup_rule: add check_mode tests * cloudstack: test: cs_configuration: add check_mode tests * cloudstack: test: cs_firewall: add check_mode tests * cloudstack: test: cs_instance: add check_mode tests * cloudstack: query current tags from API Fixes unexpected tags returned in check mode.
This commit is contained in:
parent
2af5556901
commit
d5b04aa1f1
32 changed files with 1838 additions and 33 deletions
|
@ -1,14 +1,26 @@
|
|||
---
|
||||
- name: ensure iso is deleted
|
||||
- name: setup iso
|
||||
cs_iso:
|
||||
name: "{{ cs_resource_prefix }}-iso"
|
||||
state: absent
|
||||
register: iso
|
||||
- name: verify ensure iso is deleted
|
||||
- name: verify setup iso
|
||||
assert:
|
||||
that:
|
||||
- iso|success
|
||||
|
||||
- name: test download iso in check mode
|
||||
cs_iso:
|
||||
name: "{{ cs_resource_prefix }}-iso"
|
||||
url: http://mirror.switch.ch/ftp/mirror/debian-cd/current/amd64/iso-cd/debian-7.7.0-amd64-netinst.iso
|
||||
os_type: Debian GNU/Linux 7(64-bit)
|
||||
register: iso
|
||||
check_mode: true
|
||||
- name: verify test download iso in check mode
|
||||
assert:
|
||||
that:
|
||||
- iso|changed
|
||||
|
||||
- name: test download iso
|
||||
cs_iso:
|
||||
name: "{{ cs_resource_prefix }}-iso"
|
||||
|
@ -33,21 +45,17 @@
|
|||
- not iso|changed
|
||||
- iso.name == "{{ cs_resource_prefix }}-iso"
|
||||
|
||||
# TODO: on 4.6 simulator no checksum was returned
|
||||
# TODO: check if this is a bug in 4.6
|
||||
#- name: test download iso idempotence by checksum
|
||||
# cs_iso:
|
||||
# name: "{{ cs_resource_prefix }}-iso2"
|
||||
# checksum: "{{ iso.checksum }}"
|
||||
# url: http://mirror.switch.ch/ftp/mirror/debian-cd/current/amd64/iso-cd/debian-7.7.0-amd64-netinst.iso
|
||||
# os_type: Debian GNU/Linux 7(64-bit)
|
||||
# register: iso2
|
||||
#- name: verify test download iso idempotence by checksum
|
||||
# assert:
|
||||
# that:
|
||||
# - not iso2|changed
|
||||
# - iso2.name == "{{ cs_resource_prefix }}-iso"
|
||||
# - iso2.checksum == iso.checksum
|
||||
- name: test remove iso in check mode
|
||||
cs_iso:
|
||||
name: "{{ cs_resource_prefix }}-iso"
|
||||
state: absent
|
||||
register: iso
|
||||
check_mode: true
|
||||
- name: verify test remove iso in check mode
|
||||
assert:
|
||||
that:
|
||||
- iso|changed
|
||||
- iso.name == "{{ cs_resource_prefix }}-iso"
|
||||
|
||||
- name: test remove iso
|
||||
cs_iso:
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue