diff options
author | Rohit Thakur <rohitthakur2590@outlook.com> | 2020-04-28 20:06:16 +0530 |
---|---|---|
committer | Rohit Thakur <rohitthakur2590@outlook.com> | 2020-04-28 20:06:16 +0530 |
commit | bf9a91b4859e07c40b0a6aeb64b8ef6096af41b1 (patch) | |
tree | 69fdf2ce5a15e1505290e850e41341cdead88895 /tests/integration | |
parent | 3f112a81a78f499d105632b4634d7feec0401161 (diff) | |
download | vyos.vyos-bf9a91b4859e07c40b0a6aeb64b8ef6096af41b1.tar.gz vyos.vyos-bf9a91b4859e07c40b0a6aeb64b8ef6096af41b1.zip |
firewall_rules delete enhanced
Signed-off-by: Rohit Thakur <rohitthakur2590@outlook.com>
Diffstat (limited to 'tests/integration')
3 files changed, 0 insertions, 103 deletions
diff --git a/tests/integration/targets/vyos_firewall_rules/tests/cli/deleted.yaml b/tests/integration/targets/vyos_firewall_rules/tests/cli/deleted.yaml index 7acfe65..67bfd3c 100644 --- a/tests/integration/targets/vyos_firewall_rules/tests/cli/deleted.yaml +++ b/tests/integration/targets/vyos_firewall_rules/tests/cli/deleted.yaml @@ -11,15 +11,11 @@ register: result vyos.vyos.vyos_firewall_rules: &id001 config: - - afi: ipv6 rule_sets: - - name: UPLINK - - afi: ipv4 rule_sets: - - name: INBOUND state: deleted diff --git a/tests/integration/targets/vyos_firewall_rules/tests/cli/deleted_rule.yaml b/tests/integration/targets/vyos_firewall_rules/tests/cli/deleted_rule.yaml deleted file mode 100644 index d77e2a9..0000000 --- a/tests/integration/targets/vyos_firewall_rules/tests/cli/deleted_rule.yaml +++ /dev/null @@ -1,58 +0,0 @@ ---- -- debug: - msg: Start vyos_firewall_rules deleted integration tests ansible_connection={{ - ansible_connection }} - -- include_tasks: _populate.yaml - -- block: - - - name: Delete firewall rule. - register: result - vyos.vyos.vyos_firewall_rules: &id001 - config: - - - afi: ipv6 - rule_sets: - - - name: UPLINK - rules: - - - number: 1 - state: deleted - - - name: Assert that the before dicts were correctly generated - assert: - that: - - "{{ populate | symmetric_difference(result['before']) |length == 0 }}" - - - name: Assert that the correct set of commands were generated - assert: - that: - - "{{ deleted_r['commands'] | symmetric_difference(result['commands'])\ - \ |length == 0 }}" - - - name: Assert that the after dicts were correctly generated - assert: - that: - - "{{ deleted_r['after'] | symmetric_difference(result['after']) |length\ - \ == 0 }}" - - - name: Delete attributes of given interfaces (IDEMPOTENT) - register: result - vyos.vyos.vyos_firewall_rules: *id001 - - - name: Assert that the previous task was idempotent - assert: - that: - - result.changed == false - - result.commands|length == 0 - - - name: Assert that the before dicts were correctly generated - assert: - that: - - "{{ deleted_r['after'] | symmetric_difference(result['before']) |length\ - \ == 0 }}" - always: - - - include_tasks: _remove_config.yaml diff --git a/tests/integration/targets/vyos_firewall_rules/vars/main.yaml b/tests/integration/targets/vyos_firewall_rules/vars/main.yaml index c15a101..adfc48a 100644 --- a/tests/integration/targets/vyos_firewall_rules/vars/main.yaml +++ b/tests/integration/targets/vyos_firewall_rules/vars/main.yaml @@ -229,47 +229,6 @@ deleted_afi_all: - delete firewall ipv6-name - delete firewall name after: [] -deleted_r: - commands: - - delete firewall ipv6-name UPLINK rule 1 - after: - - afi: ipv6 - rule_sets: - - name: UPLINK - description: This is ipv6 specific rule-set - default_action: accept - rules: - - number: 2 - action: accept - description: Fwipv6-Rule 2 is configured by Ansible - ipsec: match-ipsec - - afi: ipv4 - rule_sets: - - name: INBOUND - description: IPv4 INBOUND rule set - default_action: accept - rules: - - number: 101 - action: accept - description: Rule 101 is configured by Ansible - ipsec: match-ipsec - - number: 102 - action: reject - description: Rule 102 is configured by Ansible - ipsec: match-ipsec - - number: 103 - action: accept - description: Rule 103 is configured by Ansible - destination: - group: - address_group: inbound - source: - address: 192.0.2.0 - state: - established: true - new: false - invalid: false - related: true round_trip: after: - afi: ipv6 |