diff options
Diffstat (limited to 'test/integration/targets/eos_acl_interfaces/tests')
11 files changed, 0 insertions, 358 deletions
diff --git a/test/integration/targets/eos_acl_interfaces/tests/cli/_parsed.cfg b/test/integration/targets/eos_acl_interfaces/tests/cli/_parsed.cfg deleted file mode 100644 index 59e767e969..0000000000 --- a/test/integration/targets/eos_acl_interfaces/tests/cli/_parsed.cfg +++ /dev/null @@ -1,6 +0,0 @@ -interface GigabitEthernet0/0 -ip access-group aclv401 in -ip access-group aclv402 out -ipv6 traffic-filter aclv601 out -interface GigabitEthernet0/1 -ipv6 traffic-filter aclv601 in diff --git a/test/integration/targets/eos_acl_interfaces/tests/cli/_populate.yaml b/test/integration/targets/eos_acl_interfaces/tests/cli/_populate.yaml deleted file mode 100644 index 8200bb730c..0000000000 --- a/test/integration/targets/eos_acl_interfaces/tests/cli/_populate.yaml +++ /dev/null @@ -1,24 +0,0 @@ ---- -- name: Setup - eos_acl_interfaces: - config: - - name: "{{ Interfaces['int1'] }}" - access_groups: - - afi: ipv4 - acls: - - name: aclv401 - direction: in - - name: aclv402 - direction: out - - afi: ipv6 - acls: - - name: aclv601 - direction: out - - name: "{{ Interfaces['int2'] }}" - access_groups: - - afi: ipv6 - acls: - - name: aclv601 - direction: in - state: merged - become: yes diff --git a/test/integration/targets/eos_acl_interfaces/tests/cli/_remove_config.yaml b/test/integration/targets/eos_acl_interfaces/tests/cli/_remove_config.yaml deleted file mode 100644 index 903bde3796..0000000000 --- a/test/integration/targets/eos_acl_interfaces/tests/cli/_remove_config.yaml +++ /dev/null @@ -1,8 +0,0 @@ ---- -- name: Setup - eos_acl_interfaces: - config: - - name: "{{ Interfaces['int1'] }}" - - name: "{{ Interfaces['int2'] }}" - state: deleted - become: yes diff --git a/test/integration/targets/eos_acl_interfaces/tests/cli/deleted.yaml b/test/integration/targets/eos_acl_interfaces/tests/cli/deleted.yaml deleted file mode 100644 index d5814649cd..0000000000 --- a/test/integration/targets/eos_acl_interfaces/tests/cli/deleted.yaml +++ /dev/null @@ -1,57 +0,0 @@ ---- -- debug: - msg: "Start eos_acl_interfaces deleted integration tests ansible_connection={{ ansible_connection }}" - -- include_tasks: _populate.yaml - -- block: - - - name: Delete attributes of given acl_interfaces of an afi. - eos_acl_interfaces: - config: - - name: "{{ Interfaces['int1'] }}" - access_groups: - - afi: ipv6 - state: deleted - register: result - - - assert: - that: - - "result.commands|length == 2" - - "result.changed == true" - - "'no ipv6 traffic-filter aclv601 out' in result.commands" - - - name: Delete attributes of given acl_interfaces configuration. - eos_acl_interfaces: - config: - - name: "{{ Interfaces['int1'] }}" - access_groups: - - afi: ipv4 - acls: - - name: aclv401 - direction: in - state: deleted - register: result - - - assert: - that: - - "result.commands|length == 2" - - "result.changed == true" - - "'no ip access-group aclv401 in' in result.commands" - - - - name: Delete attributes of given acl_interfaces of an interface. - eos_acl_interfaces: - config: - - name: "{{ Interfaces['int1'] }}" - state: deleted - register: result - - - assert: - that: - - "result.commands|length == 2" - - "result.changed == true" - - "'no ip access-group aclv402 out' in result.commands" - - always: - - include_tasks: _remove_config.yaml diff --git a/test/integration/targets/eos_acl_interfaces/tests/cli/empty_config.yaml b/test/integration/targets/eos_acl_interfaces/tests/cli/empty_config.yaml deleted file mode 100644 index e39c914cf1..0000000000 --- a/test/integration/targets/eos_acl_interfaces/tests/cli/empty_config.yaml +++ /dev/null @@ -1,57 +0,0 @@ -- debug: - msg: "START eos_acl_interfaces empty_config integration tests on connection={{ ansible_connection }}" - -- name: Merged with empty config should give appropriate error message - eos_acl_interfaces: - config: - state: merged - register: result - ignore_errors: True - -- assert: - that: - - result.msg == 'value of config parameter must not be empty for state merged' - -- name: Replaced with empty config should give appropriate error message - eos_acl_interfaces: - config: - state: replaced - register: result - ignore_errors: True - -- assert: - that: - - result.msg == 'value of config parameter must not be empty for state replaced' - -- name: Overridden with empty config should give appropriate error message - eos_acl_interfaces: - config: - state: overridden - register: result - ignore_errors: True - -- assert: - that: - - result.msg == 'value of config parameter must not be empty for state overridden' - -- name: Rendered with empty config should give appropriate error message - eos_acl_interfaces: - config: - state: rendered - register: result - ignore_errors: True - -- assert: - that: - - result.msg == 'value of config parameter must not be empty for state rendered' - -- name: Parsed with empty config should give appropriate error message - eos_acl_interfaces: - running_config: - state: parsed - register: result - ignore_errors: True - -- assert: - that: - - result.msg == 'value of running_config parameter must not be empty for state parsed' diff --git a/test/integration/targets/eos_acl_interfaces/tests/cli/gathered.yaml b/test/integration/targets/eos_acl_interfaces/tests/cli/gathered.yaml deleted file mode 100644 index 4d977b9094..0000000000 --- a/test/integration/targets/eos_acl_interfaces/tests/cli/gathered.yaml +++ /dev/null @@ -1,23 +0,0 @@ ---- -- debug: - msg: "START eos_acl_interfaces gathered integration tests on connection={{ ansible_connection }}" - - -- include_tasks: _populate.yaml - -- block: - - name: Gathered the provided configuration with the exisiting running configuration - eos_acl_interfaces: &gathered - config: - state: gathered - become: yes - register: result - - - name: Assert - assert: - that: - - "gathered['config'] | symmetric_difference(result.gathered) == []" - - "result['changed'] == false" - - always: - - include_tasks: _remove_config.yaml diff --git a/test/integration/targets/eos_acl_interfaces/tests/cli/merged.yaml b/test/integration/targets/eos_acl_interfaces/tests/cli/merged.yaml deleted file mode 100644 index 80beba69b9..0000000000 --- a/test/integration/targets/eos_acl_interfaces/tests/cli/merged.yaml +++ /dev/null @@ -1,51 +0,0 @@ ---- -- debug: - msg: "Start eos_acl_interfaces merged integration tests ansible_connection={{ ansible_connection }}" - - -- block: - - - name: merge given acl interfaces configuration - eos_acl_interfaces: &merged - config: - - name: "{{ Interfaces['int1'] }}" - access_groups: - - afi: ipv4 - acls: - - name: aclv401 - direction: in - - name: aclv402 - direction: out - - afi: ipv6 - acls: - - name: aclv601 - direction: out - - name: "{{ Interfaces['int2'] }}" - access_groups: - - afi: ipv6 - acls: - - name: aclv601 - direction: in - state: merged - become: yes - register: result - - - assert: - that: - - "result.commands|length == 6" - - "result.changed == true" - - "result.commands|symmetric_difference(merged.commands) == []" - - - name: Idempotency check - eos_acl_interfaces: *merged - become: yes - register: result - - - assert: - that: - - "result.commands|length == 0" - - "result.changed == false" - - - always: - - include_tasks: _remove_config.yaml diff --git a/test/integration/targets/eos_acl_interfaces/tests/cli/overridden.yaml b/test/integration/targets/eos_acl_interfaces/tests/cli/overridden.yaml deleted file mode 100644 index 483f04d813..0000000000 --- a/test/integration/targets/eos_acl_interfaces/tests/cli/overridden.yaml +++ /dev/null @@ -1,40 +0,0 @@ ---- -- debug: - msg: "Start eos_acl_interfaces overridden integration tests ansible_connection={{ ansible_connection }}" - -- include_tasks: _populate.yaml - -- block: - - - name: override given acl interfaces configuration - eos_acl_interfaces: &overridden - config: - - name: "{{ Interfaces['int2'] }}" - access_groups: - - afi: ipv4 - acls: - - name: aclv401 - direction: in - state: overridden - become: yes - register: result - - - assert: - that: - - "result.commands|length == 7" - - "result.changed == true" - - "result.commands|symmetric_difference(overridden.commands) == []" - - - name: Idempotency check - eos_acl_interfaces: *overridden - become: yes - register: result - - - assert: - that: - - "result.commands|length == 0" - - "result.changed == false" - - - always: - - include_tasks: _remove_config.yaml diff --git a/test/integration/targets/eos_acl_interfaces/tests/cli/parsed.yaml b/test/integration/targets/eos_acl_interfaces/tests/cli/parsed.yaml deleted file mode 100644 index 7f8cd6cd92..0000000000 --- a/test/integration/targets/eos_acl_interfaces/tests/cli/parsed.yaml +++ /dev/null @@ -1,16 +0,0 @@ ---- -- debug: - msg: "START eos_acl_interfaces parsed integration tests on connection={{ ansible_connection }}" - -- name: Provide the running configuration for parsing (config to be parsed) - eos_acl_interfaces: &parsed - running_config: - "{{ lookup('file', '_parsed.cfg') }}" - state: parsed - become: yes - register: result - -- assert: - that: - - "result.changed == false" - - "parsed['config']|symmetric_difference(result.parsed) == []" diff --git a/test/integration/targets/eos_acl_interfaces/tests/cli/rendered.yaml b/test/integration/targets/eos_acl_interfaces/tests/cli/rendered.yaml deleted file mode 100644 index a6d15cc4b9..0000000000 --- a/test/integration/targets/eos_acl_interfaces/tests/cli/rendered.yaml +++ /dev/null @@ -1,36 +0,0 @@ ---- -- debug: - msg: "Start eos_acl_interfaces rendered integration tests ansible_connection={{ ansible_connection }}" - - -- block: - - - name: render given acl interfaces configuration - eos_acl_interfaces: - config: - - name: "{{ Interfaces['int1'] }}" - access_groups: - - afi: ipv4 - acls: - - name: aclv401 - direction: in - - name: aclv402 - direction: out - - afi: ipv6 - acls: - - name: aclv601 - direction: out - - name: "{{ Interfaces['int2'] }}" - access_groups: - - afi: ipv6 - acls: - - name: aclv601 - direction: in - state: rendered - become: yes - register: result - - - assert: - that: - - "result.changed == false" - - "result.rendered|symmetric_difference(merged.commands) == []" diff --git a/test/integration/targets/eos_acl_interfaces/tests/cli/replaced.yaml b/test/integration/targets/eos_acl_interfaces/tests/cli/replaced.yaml deleted file mode 100644 index 310581fc10..0000000000 --- a/test/integration/targets/eos_acl_interfaces/tests/cli/replaced.yaml +++ /dev/null @@ -1,40 +0,0 @@ ---- -- debug: - msg: "Start eos_acl_interfaces replced integration tests ansible_connection={{ ansible_connection }}" - -- include_tasks: _populate.yaml - -- block: - - - name: replace given acl interfaces configuration - eos_acl_interfaces: &replaced - config: - - name: "{{ Interfaces['int2'] }}" - access_groups: - - afi: ipv4 - acls: - - name: aclv401 - direction: in - state: replaced - become: yes - register: result - - - assert: - that: - - "result.commands|length == 3" - - "result.changed == true" - - "result.commands|symmetric_difference(replaced.commands) == []" - - - name: Idempotency check - eos_acl_interfaces: *replaced - become: yes - register: result - - - assert: - that: - - "result.commands|length == 0" - - "result.changed == false" - - - always: - - include_tasks: _remove_config.yaml |