diff --git a/test/integration/targets/azure_rm_dnszone/aliases b/test/integration/targets/azure_rm_dnszone/aliases index 8f7a9a2e56..efd4c726ae 100644 --- a/test/integration/targets/azure_rm_dnszone/aliases +++ b/test/integration/targets/azure_rm_dnszone/aliases @@ -1,3 +1,4 @@ cloud/azure shippable/azure/group1 destructive +azure_rm_dnszone_facts diff --git a/test/integration/targets/azure_rm_dnszone/tasks/main.yml b/test/integration/targets/azure_rm_dnszone/tasks/main.yml index 44a3be6f79..f48d1999af 100644 --- a/test/integration/targets/azure_rm_dnszone/tasks/main.yml +++ b/test/integration/targets/azure_rm_dnszone/tasks/main.yml @@ -42,6 +42,18 @@ - results.state.tags.test == 'new_modified' - results.check_mode == true +- name: Retrieve DNS Zone Facts + azure_rm_dnszone_facts: + resource_group: "{{ resource_group }}" + name: "{{ domain_name }}.com" + register: results + +- name: Assert that facts module returned result + assert: + that: + - not results.changed + - results.ansible_facts.azure_dnszones[0].tags.test == 'modified' + - name: Delete DNS zone azure_rm_dnszone: resource_group: "{{ resource_group }}" diff --git a/test/integration/targets/azure_rm_dnszone_facts/aliases b/test/integration/targets/azure_rm_dnszone_facts/aliases deleted file mode 100644 index 01fee7d451..0000000000 --- a/test/integration/targets/azure_rm_dnszone_facts/aliases +++ /dev/null @@ -1,4 +0,0 @@ -cloud/azure -shippable/azure/group1 -shippable/azure/smoketest -destructive diff --git a/test/integration/targets/azure_rm_dnszone_facts/meta/main.yml b/test/integration/targets/azure_rm_dnszone_facts/meta/main.yml deleted file mode 100644 index 95e1952f98..0000000000 --- a/test/integration/targets/azure_rm_dnszone_facts/meta/main.yml +++ /dev/null @@ -1,2 +0,0 @@ -dependencies: - - setup_azure diff --git a/test/integration/targets/azure_rm_dnszone_facts/tasks/main.yml b/test/integration/targets/azure_rm_dnszone_facts/tasks/main.yml deleted file mode 100644 index 81420ec65b..0000000000 --- a/test/integration/targets/azure_rm_dnszone_facts/tasks/main.yml +++ /dev/null @@ -1,34 +0,0 @@ -- name: Create random domain name - set_fact: - domain_name: "{{ resource_group | hash('md5') | truncate(16, True, '') + (65535 | random | string) }}" - -- name: Create a DNS zone - azure_rm_dnszone: - resource_group: "{{ resource_group }}" - name: "{{ domain_name }}.com" - state: present - tags: - tag1: tag1 - register: results - -- name: Assert DNS Zone was created - assert: - that: results.changed - -- name: Retrieve DNS Zone Facts - azure_rm_dnszone_facts: - resource_group: "{{ resource_group }}" - name: "{{ domain_name }}.com" - register: results - -- name: Assert that facts module returned result - assert: - that: - - not results.changed - - results.ansible_facts.azure_dnszones[0].tags.tag1 == 'tag1' - -- name: Delete DNS zone - azure_rm_dnszone: - resource_group: "{{ resource_group }}" - name: "{{ domain_name }}.com" - state: absent