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
|
@ -27,6 +27,15 @@
|
|||
- dom|failed
|
||||
- dom.msg == "Path '{{ cs_resource_prefix }}_domain/' must not end with /"
|
||||
|
||||
- name: test create a domain in check mode
|
||||
cs_domain: path={{ cs_resource_prefix }}_domain
|
||||
register: dom
|
||||
check_mode: true
|
||||
- name: verify results of test create a domain in check mode
|
||||
assert:
|
||||
that:
|
||||
- dom|changed
|
||||
|
||||
- name: test create a domain
|
||||
cs_domain: path={{ cs_resource_prefix }}_domain
|
||||
register: dom
|
||||
|
@ -47,6 +56,15 @@
|
|||
- dom.path == "ROOT/{{ cs_resource_prefix }}_domain"
|
||||
- dom.name == "{{ cs_resource_prefix }}_domain"
|
||||
|
||||
- name: test create a subdomain in check mode
|
||||
cs_domain: path=ROOT/{{ cs_resource_prefix }}_domain/{{ cs_resource_prefix }}_subdomain
|
||||
register: dom
|
||||
check_mode: true
|
||||
- name: verify results of test create a domain in check mode
|
||||
assert:
|
||||
that:
|
||||
- dom|changed
|
||||
|
||||
- name: test create a subdomain
|
||||
cs_domain: path=ROOT/{{ cs_resource_prefix }}_domain/{{ cs_resource_prefix }}_subdomain
|
||||
register: dom
|
||||
|
@ -65,10 +83,21 @@
|
|||
that:
|
||||
- not dom|changed
|
||||
|
||||
- name: test delete a subdomain in check mode
|
||||
cs_domain: path=ROOT/{{ cs_resource_prefix }}_domain/{{ cs_resource_prefix }}_subdomain state=absent
|
||||
register: dom
|
||||
check_mode: true
|
||||
- name: verify results of test delete a subdomain in check mode
|
||||
assert:
|
||||
that:
|
||||
- dom|changed
|
||||
- dom.path == "ROOT/{{ cs_resource_prefix }}_domain/{{ cs_resource_prefix }}_subdomain"
|
||||
- dom.name == "{{ cs_resource_prefix }}_subdomain"
|
||||
|
||||
- name: test delete a subdomain
|
||||
cs_domain: path=ROOT/{{ cs_resource_prefix }}_domain/{{ cs_resource_prefix }}_subdomain state=absent
|
||||
register: dom
|
||||
- name: verify results of test delete a subdomain idempotence
|
||||
- name: verify results of test delete a subdomain
|
||||
assert:
|
||||
that:
|
||||
- dom|changed
|
||||
|
@ -93,6 +122,17 @@
|
|||
- dom.path == "ROOT/{{ cs_resource_prefix }}_domain/{{ cs_resource_prefix }}_subdomain"
|
||||
- dom.name == "{{ cs_resource_prefix }}_subdomain"
|
||||
|
||||
- name: test delete a domain with clean up in check mode
|
||||
cs_domain: path=ROOT/{{ cs_resource_prefix }}_domain state=absent clean_up=true
|
||||
register: dom
|
||||
check_mode: true
|
||||
- name: verify results of test delete a domain with clean up in check mode
|
||||
assert:
|
||||
that:
|
||||
- dom|changed
|
||||
- dom.path == "ROOT/{{ cs_resource_prefix }}_domain"
|
||||
- dom.name == "{{ cs_resource_prefix }}_domain"
|
||||
|
||||
- name: test delete a domain with clean up
|
||||
cs_domain: path=ROOT/{{ cs_resource_prefix }}_domain state=absent clean_up=true
|
||||
register: dom
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue