From 09f294912ed1c54380f0c874a1820f7f58a5b613 Mon Sep 17 00:00:00 2001 From: tfmark Date: Wed, 21 Apr 2021 12:25:38 +0100 Subject: [PATCH] azure_rm_securitygroup - adding testcase --- .../azure_rm_securitygroup/tasks/main.yml | 22 +++++++++++++++---- 1 file changed, 18 insertions(+), 4 deletions(-) diff --git a/tests/integration/targets/azure_rm_securitygroup/tasks/main.yml b/tests/integration/targets/azure_rm_securitygroup/tasks/main.yml index 86283503af..8df4bb84d2 100644 --- a/tests/integration/targets/azure_rm_securitygroup/tasks/main.yml +++ b/tests/integration/targets/azure_rm_securitygroup/tasks/main.yml @@ -61,11 +61,18 @@ source_address_prefix: 174.109.158.0/24 destination_port_range: 22-23 priority: 102 + - name: AllowHTTPandHTTPS + protocol: Tcp + source_address_prefix: 174.109.158.0/24 + destination_port_range: + - 80 + - 443 + priority: 103 register: output -- assert: +- assert: that: - - "{{ output.state.rules | length }} == 3" + - "{{ output.state.rules | length }} == 4" - output.state.rules[0].source_address_prefix == '174.108.158.0/24' - name: Test idempotence @@ -84,6 +91,13 @@ source_address_prefix: 174.109.158.0/24 destination_port_range: 22-23 priority: 102 + - name: AllowHTTPandHTTPS + protocol: Tcp + source_address_prefix: 174.109.158.0/24 + destination_port_range: + - 80 + - 443 + priority: 103 register: output - assert: @@ -102,7 +116,7 @@ - assert: that: - - output.state.tags | length == 3 + - output.state.tags | length == 4 - output.state.tags.delete == 'never' - name: Purge tags @@ -214,7 +228,7 @@ register: output - assert: - that: + that: - output.changed - "{{ output.state.rules | length }} == 2"