1
0
Fork 0
mirror of https://github.com/ansible-collections/community.general.git synced 2024-09-14 20:13:21 +02:00

consolidate availabilityset tests (#45327)

This commit is contained in:
Zim Kalinowski 2018-09-07 12:52:00 +08:00 committed by Yunge Zhu
parent 8adc7901ed
commit d309530bb6
5 changed files with 19 additions and 35 deletions

View file

@ -1,3 +1,4 @@
cloud/azure
shippable/azure/group1
destructive
azure_rm_availalibityset_facts

View file

@ -99,6 +99,24 @@
- not results.changed
- results.state.tags.checktest1 == 'modified1'
#
# azure_rm_availabilityset_facts tests
#
- name: Get facts for created availability set
azure_rm_availabilityset_facts:
name: myavailabilityset2
resource_group: "{{ resource_group }}"
register: results
- assert:
that:
- not results.changed
- not results.failed
- results.ansible_facts.azure_availabilitysets[0].properties.platformFaultDomainCount == 2
- results.ansible_facts.azure_availabilitysets[0].properties.platformUpdateDomainCount == 5
- results.ansible_facts.azure_availabilitysets[0].sku == 'Aligned'
- name: Delete an availability set
azure_rm_availabilityset:
name: myavailabilityset1

View file

@ -1,4 +0,0 @@
cloud/azure
shippable/azure/group4
shippable/azure/smoketest
destructive

View file

@ -1,2 +0,0 @@
dependencies:
- setup_azure

View file

@ -1,29 +0,0 @@
- name: Create an availability set
azure_rm_availabilityset:
name: myavailabilityset1
resource_group: "{{ resource_group }}"
platform_update_domain_count: 5
platform_fault_domain_count: 2
sku: Classic
tags:
tag1: testtag
- name: Get facts for created availability set
azure_rm_availabilityset_facts:
name: myavailabilityset1
resource_group: "{{ resource_group }}"
register: results
- assert:
that:
- not results.changed
- not results.failed
- results.ansible_facts.azure_availabilitysets[0].properties.platformFaultDomainCount == 2
- results.ansible_facts.azure_availabilitysets[0].properties.platformUpdateDomainCount == 5
- results.ansible_facts.azure_availabilitysets[0].sku == 'Classic'
- name: Delete the availability set
azure_rm_availabilityset:
name: myavailabilityset1
resource_group: "{{ resource_group }}"
state: absent