diff options
author | René Moser <mail@renemoser.net> | 2017-05-26 12:19:47 +0200 |
---|---|---|
committer | GitHub <noreply@github.com> | 2017-05-26 12:19:47 +0200 |
commit | d5b04aa1f16bfef43799a89c57d3bcfa8bcfbd40 (patch) | |
tree | 83b1600c7e609e903417bcd1df3f4df7e647637e /test/integration/targets/cs_domain | |
parent | Added autoclean/autoremove for the apt module (diff) | |
download | ansible-d5b04aa1f16bfef43799a89c57d3bcfa8bcfbd40.tar.xz ansible-d5b04aa1f16bfef43799a89c57d3bcfa8bcfbd40.zip |
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.
Diffstat (limited to 'test/integration/targets/cs_domain')
-rw-r--r-- | test/integration/targets/cs_domain/tasks/main.yml | 42 |
1 files changed, 41 insertions, 1 deletions
diff --git a/test/integration/targets/cs_domain/tasks/main.yml b/test/integration/targets/cs_domain/tasks/main.yml index 697a62f764..5e10f1b018 100644 --- a/test/integration/targets/cs_domain/tasks/main.yml +++ b/test/integration/targets/cs_domain/tasks/main.yml @@ -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 |