Clean up and migrate Azure tests. (#28103)

* Remove placeholder Azure test.
* Migrate Azure tests to ansible-test.
* Initial cleanup on remaining legacy Azure tests.
This commit is contained in:
Matt Clay
2017-08-12 01:03:42 -07:00
committed by GitHub
parent ac56a2f138
commit 3631163329
23 changed files with 264 additions and 638 deletions

View File

@@ -1,12 +1,3 @@
- name: Create resource group
azure_rm_resourcegroup:
name: "{{ resource_group }}"
location: "{{ location }}"
register: output
- debug: var=output
when: playbook_debug
- name: Create virtual network
azure_rm_virtualnetwork:
name: vnet001
@@ -14,9 +5,6 @@
address_prefixes_cidr: "10.10.0.0/16"
register: output
- debug: var=output
when: playbook_debug
- name: Create subnet
azure_rm_subnet:
name: subnet001
@@ -25,9 +13,6 @@
address_prefix_cidr: "10.10.0.0/24"
register: output
- debug: var=output
when: playbook_debug
- name: Create second virtual network
azure_rm_virtualnetwork:
name: vnet002
@@ -35,9 +20,6 @@
address_prefixes_cidr: "10.20.0.0/16"
register: output
- debug: var=output
when: playbook_debug
- name: Create second subnet
azure_rm_subnet:
name: subnet002
@@ -46,27 +28,18 @@
address_prefix_cidr: "10.20.0.0/24"
register: output
- debug: var=output
when: playbook_debug
- name: Create security group
azure_rm_securitygroup:
name: secgroup001
resource_group: "{{ resource_group }}"
register: output
- debug: var=output
when: playbook_debug
- name: Create second security group
azure_rm_securitygroup:
name: secgroup002
resource_group: "{{ resource_group }}"
register: output
- debug: var=output
when: playbook_debug
- name: Create a public ip
azure_rm_publicipaddress:
name: publicip001
@@ -74,9 +47,6 @@
allocation_method: "Static"
register: output
- debug: var=output
when: playbook_debug
- name: Create second public ip
azure_rm_publicipaddress:
name: publicip002
@@ -84,9 +54,6 @@
allocation_method: "Static"
register: output
- debug: var=output
when: playbook_debug
- name: Delete network interface, if it exists
azure_rm_networkinterface:
name: nic003
@@ -94,9 +61,6 @@
state: absent
register: output
- debug: var=output
when: playbook_debug
- name: Should require subnet when creating nic
azure_rm_networkinterface:
name: nic003
@@ -107,9 +71,6 @@
register: output
ignore_errors: yes
- debug: var=output
when: playbook_debug
- assert:
that:
- output.failed
@@ -125,9 +86,6 @@
register: output
ignore_errors: yes
- debug: var=output
when: playbook_debug
- assert:
that:
- output.failed
@@ -143,9 +101,6 @@
public_ip_address_name: publicip001
register: output
- debug: var=output
when: playbook_debug
- name: Should be idempotent
azure_rm_networkinterface:
name: nic003
@@ -156,9 +111,6 @@
public_ip_address_name: publicip001
register: output
- debug: var=output
when: playbook_debug
- assert:
that: not output.changed
@@ -174,9 +126,6 @@
public_ip_address_name: publicip001
register: output
- debug: var=output
when: playbook_debug
- assert:
that:
- output.changed
@@ -194,9 +143,6 @@
public_ip_address_name: publicip002
register: output
- debug: var=output
when: playbook_debug
- assert:
that:
- output.changed
@@ -214,9 +160,6 @@
foo: bar
register: output
- debug: var=output
when: playbook_debug
- assert:
that:
- output.state.tags | length == 2
@@ -260,9 +203,6 @@
testing: testing
register: output
- debug: var=output
when: playbook_debug
- assert:
that:
- output.changed
@@ -275,9 +215,6 @@
tags: {}
register: output
- debug: var=output
when: playbook_debug
- assert:
that:
- output.changed
@@ -293,10 +230,6 @@
- nic004
- nic005
- debug: var=output
when: playbook_debug
- name: Remove publicip, if it exists
azure_rm_publicipaddress:
name: "{{ item }}"
@@ -323,9 +256,6 @@
subnet: subnet001
register: output
- debug: var=output
when: playbook_debug
- assert:
that:
- output.state.ip_configuration.public_ip_address.name == 'nic00401'
@@ -337,9 +267,6 @@
name: nic00401
register: output
- debug: var=output
when: playbook_debug
- assert:
that:
- azure_securitygroups[0].properties.securityRules[0].properties.destinationPortRange == '22'
@@ -356,9 +283,6 @@
- '9005-9010'
register: output
- debug: var=output
when: playbook_debug
- assert:
that:
- output.state.ip_configuration.public_ip_address.name == 'nic00501'
@@ -370,9 +294,6 @@
name: nic00501
register: output
- debug: var=output
when: playbook_debug
- name: Security group should allow RDP access on custom port
assert:
that:
@@ -385,9 +306,6 @@
name: nic003
register: output
- debug: var=output
when: playbook_debug
- assert:
that:
- azure_networkinterfaces | length == 1
@@ -397,9 +315,6 @@
resource_group: "{{ resource_group }}"
register: output
- debug: var=output
when: playbook_debug
- assert:
that:
- azure_networkinterfaces | length >= 3
@@ -408,9 +323,6 @@
azure_rm_networkinterface_facts:
register: output
- debug: var=output
when: playbook_debug
- assert:
that:
- azure_networkinterfaces | length >= 3