diff --git a/tests/integration/targets/iosxr_acls/tests/cli/_remove_config.yaml b/tests/integration/targets/iosxr_acls/tests/cli/_remove_config.yaml index aa024303..2585c995 100644 --- a/tests/integration/targets/iosxr_acls/tests/cli/_remove_config.yaml +++ b/tests/integration/targets/iosxr_acls/tests/cli/_remove_config.yaml @@ -2,7 +2,7 @@ - name: Remove acls vars: lines: - "no ipv4 access-list acl_1\nno ipv4 access-list acl_2\nno ipv4 access-list acl_3\nno ipv4 access-list acl_3\nno ipv4 access-list test_acl\nno ipv6 access-list acl6_1\nno ipv6 access-list\ + "no ipv4 access-list acl_1\nno ipv4 access-list acl_2\nno ipv4 access-list acl_3\nno ipv4 access-list acl_3\nno ipv6 access-list acl6_1\nno ipv6 access-list\ \ acl6_2\nno ipv6 access-list acl6_3\n" ignore_errors: true ansible.netcommon.cli_config: diff --git a/tests/integration/targets/iosxr_acls/tests/cli/replaced.yaml b/tests/integration/targets/iosxr_acls/tests/cli/replaced.yaml index 3c027d97..d5074429 100644 --- a/tests/integration/targets/iosxr_acls/tests/cli/replaced.yaml +++ b/tests/integration/targets/iosxr_acls/tests/cli/replaced.yaml @@ -32,12 +32,19 @@ destination: any: true protocol: icmp - - name: test_acl - aces: + - sequence: 40 remark: "Deny MARTIANS" + - sequence: 60 - line: "deny ipv4 10.0.0.0 0.255.255.255 any" + grant: deny + protocol: ipv4 + source: + address: 10.0.0.0 + wildcard_bits: 0.255.255.255 + destination: + any: true + state: replaced - name: Assert that correct set of commands were generated @@ -61,7 +68,8 @@ - name: Assert that task was idempotent ansible.builtin.assert: that: - - result.commands|length == 2 + - result['changed'] == false + - result.commands|length == 0 - name: Assert that before dict is correctly generated ansible.builtin.assert: diff --git a/tests/integration/targets/iosxr_acls/vars/main.yaml b/tests/integration/targets/iosxr_acls/vars/main.yaml index fb827d1e..38cb4c0e 100644 --- a/tests/integration/targets/iosxr_acls/vars/main.yaml +++ b/tests/integration/targets/iosxr_acls/vars/main.yaml @@ -94,7 +94,6 @@ replaced: - no 10 - 11 permit igmp host 198.51.100.130 any ttl eq 100 - 12 deny icmp any any - - ipv4 access-list test_acl - 40 remark Deny MARTIANS - 60 deny ipv4 10.0.0.0 0.255.255.255 any after: @@ -148,8 +147,6 @@ replaced: sequence: 12 source: any: true - name: acl_2 - - aces: - remark: Deny MARTIANS sequence: 40 - destination: @@ -160,7 +157,7 @@ replaced: source: address: 10.0.0.0 wildcard_bits: 0.255.255.255 - name: test_acl + name: acl_2 afi: ipv4 - acls: - aces: