mirror of
https://github.com/ansible-collections/community.general.git
synced 2024-09-14 20:13:21 +02:00
tag off long-running azure_rm_virtualnetworkgateway tests
This commit is contained in:
parent
6fff8e1d7e
commit
837ea4b39f
1 changed files with 102 additions and 64 deletions
|
@ -1,8 +1,30 @@
|
|||
# FIXME: needs minimal tests (check mode?) that can run quickly, VNG creation takes > 20min
|
||||
|
||||
- name: Prepare random number
|
||||
set_fact:
|
||||
vnetname: "vnet{{ resource_group | hash('md5') | truncate(7, True, '') }}{{ 1000 | random }}"
|
||||
vngname: "vng{{ resource_group | hash('md5') | truncate(7, True, '') }}{{ 1000 | random }}"
|
||||
|
||||
- name: Create virtual network gateway without bgp settings (check mode)
|
||||
check_mode: yes
|
||||
azure_rm_virtualnetworkgateway:
|
||||
resource_group: "{{ resource_group }}"
|
||||
name: "{{ vngname }}"
|
||||
ip_configurations:
|
||||
- name: testipconfig
|
||||
private_ip_allocation_method: Dynamic
|
||||
public_ip_address_name: testPublicIP
|
||||
virtual_network: "{{ vnetname }}"
|
||||
tags:
|
||||
common: "xyz"
|
||||
register: output
|
||||
|
||||
- assert:
|
||||
that: output.changed
|
||||
|
||||
- name: long-running virtualnetworkgateway tests [run with `--tags long_run,untagged` to enable]
|
||||
tags: [long_run, never]
|
||||
block:
|
||||
- name: Create virtual network
|
||||
azure_rm_virtualnetwork:
|
||||
resource_group: "{{ resource_group }}"
|
||||
|
@ -38,6 +60,22 @@
|
|||
- assert:
|
||||
that: output.changed
|
||||
|
||||
- name: Create virtual network gateway without bgp settings
|
||||
azure_rm_virtualnetworkgateway:
|
||||
resource_group: "{{ resource_group }}"
|
||||
name: "{{ vngname }}"
|
||||
ip_configurations:
|
||||
- name: testipconfig
|
||||
private_ip_allocation_method: Dynamic
|
||||
public_ip_address_name: testPublicIP
|
||||
virtual_network: "{{ vnetname }}"
|
||||
tags:
|
||||
common: "xyz"
|
||||
register: output
|
||||
|
||||
- assert:
|
||||
that: output.changed
|
||||
|
||||
- name: Create virtual network gateway without bgp settings - idempotent
|
||||
azure_rm_virtualnetworkgateway:
|
||||
resource_group: "{{ resource_group }}"
|
||||
|
|
Loading…
Reference in a new issue