diff options
Diffstat (limited to 'ansible_collections/arista/eos/tests/integration/targets')
19 files changed, 39 insertions, 746 deletions
diff --git a/ansible_collections/arista/eos/tests/integration/targets/eos_bgp/defaults/main.yaml b/ansible_collections/arista/eos/tests/integration/targets/eos_bgp/defaults/main.yaml deleted file mode 100644 index 9ef5ba516..000000000 --- a/ansible_collections/arista/eos/tests/integration/targets/eos_bgp/defaults/main.yaml +++ /dev/null @@ -1,3 +0,0 @@ ---- -testcase: "*" -test_items: [] diff --git a/ansible_collections/arista/eos/tests/integration/targets/eos_bgp/meta/main.yaml b/ansible_collections/arista/eos/tests/integration/targets/eos_bgp/meta/main.yaml deleted file mode 100644 index d29186fe0..000000000 --- a/ansible_collections/arista/eos/tests/integration/targets/eos_bgp/meta/main.yaml +++ /dev/null @@ -1,3 +0,0 @@ ---- -dependencies: - - prepare_eos_tests diff --git a/ansible_collections/arista/eos/tests/integration/targets/eos_bgp/tasks/cli.yaml b/ansible_collections/arista/eos/tests/integration/targets/eos_bgp/tasks/cli.yaml deleted file mode 100644 index 57bedc474..000000000 --- a/ansible_collections/arista/eos/tests/integration/targets/eos_bgp/tasks/cli.yaml +++ /dev/null @@ -1,19 +0,0 @@ ---- -- name: Collect all cli test cases - ansible.builtin.find: - paths: "{{ role_path }}/tests/cli" - patterns: "{{ testcase }}.yaml" - register: test_cases - delegate_to: localhost - -- name: Set test_items - ansible.builtin.set_fact: - test_items: "{{ test_cases.files | map(attribute='path') | list }}" - -- name: Run test cases (connection=ansible.netcommon.network_cli) - ansible.builtin.include_tasks: "{{ test_case_to_run }}" - with_items: "{{ test_items }}" - loop_control: - loop_var: test_case_to_run - vars: - ansible_connection: ansible.netcommon.network_cli diff --git a/ansible_collections/arista/eos/tests/integration/targets/eos_bgp/tasks/main.yaml b/ansible_collections/arista/eos/tests/integration/targets/eos_bgp/tasks/main.yaml deleted file mode 100644 index c3b429408..000000000 --- a/ansible_collections/arista/eos/tests/integration/targets/eos_bgp/tasks/main.yaml +++ /dev/null @@ -1,5 +0,0 @@ ---- -- name: Invoke cli tasks - ansible.builtin.include_tasks: cli.yaml - tags: - - network_cli diff --git a/ansible_collections/arista/eos/tests/integration/targets/eos_bgp/tests/cli/basic.yaml b/ansible_collections/arista/eos/tests/integration/targets/eos_bgp/tests/cli/basic.yaml deleted file mode 100644 index 794d21d3e..000000000 --- a/ansible_collections/arista/eos/tests/integration/targets/eos_bgp/tests/cli/basic.yaml +++ /dev/null @@ -1,399 +0,0 @@ ---- -- name: Basic Tests - ansible.builtin.debug: msg="START eos cli/eos_bgp.yaml on connection={{ ansible_connection }}" - -- name: Clear existing BGP config - become: true - ignore_errors: true - arista.eos.eos_bgp: &id011 - operation: delete - -- name: Configure BGP with AS 64496 and a router-id - become: true - register: result - arista.eos.eos_bgp: &id001 - operation: merge - config: - bgp_as: 64496 - router_id: 192.0.2.2 - -- name: Assertion - ansible.builtin.assert: - that: - - result.changed == true - - "'router bgp 64496' in result.commands" - - "'router-id 192.0.2.2' in result.commands" - -- name: Configure BGP with AS 64496 and a router-id (idempotent) - become: true - register: result - arista.eos.eos_bgp: *id001 - -- name: Assertion - ansible.builtin.assert: - that: - - result.changed == false - -- name: Configure BGP neighbors - become: true - register: result - arista.eos.eos_bgp: &id002 - operation: merge - config: - bgp_as: 64496 - neighbors: - - neighbor: 192.0.2.10 - remote_as: 64496 - description: IBGP_NBR_1 - ebgp_multihop: 100 - timers: - keepalive: 300 - holdtime: 360 - - - neighbor: 192.0.2.15 - remote_as: 64496 - description: IBGP_NBR_2 - ebgp_multihop: 150 - -- ansible.builtin.assert: - that: - - result.changed == true - - "'router bgp 64496' in result.commands" - - "'neighbor 192.0.2.10 remote-as 64496' in result.commands" - - "'neighbor 192.0.2.10 description IBGP_NBR_1' in result.commands" - - "'neighbor 192.0.2.10 ebgp-multihop 100' in result.commands" - - "'neighbor 192.0.2.10 timers 300 360' in result.commands" - - "'neighbor 192.0.2.15 remote-as 64496' in result.commands" - - "'neighbor 192.0.2.15 description IBGP_NBR_2' in result.commands" - - "'neighbor 192.0.2.15 ebgp-multihop 150' in result.commands" - -- name: Configure BGP neighbors (idempotent) - become: true - register: result - arista.eos.eos_bgp: *id002 - -- ansible.builtin.assert: - that: - - result.changed == false - -- name: Configure BGP neighbors with operation replace - become: true - register: result - arista.eos.eos_bgp: &id003 - operation: replace - config: - bgp_as: 64496 - neighbors: - - neighbor: 192.0.2.15 - remote_as: 64496 - description: IBGP_NBR_2 - ebgp_multihop: 150 - - - neighbor: 203.0.113.10 - remote_as: 64511 - description: EBGP_NBR_1 - -- ansible.builtin.assert: - that: - - result.changed == true - - "'neighbor 203.0.113.10 remote-as 64511' in result.commands" - - "'neighbor 203.0.113.10 description EBGP_NBR_1' in result.commands" - - "'no neighbor 192.0.2.10' in result.commands" - -- name: Configure BGP neighbors with operation replace (idempotent) - become: true - register: result - arista.eos.eos_bgp: *id003 - -- ansible.builtin.assert: - that: - - result.changed == false - -- name: Configure root-level networks for BGP - become: true - register: result - arista.eos.eos_bgp: &id004 - operation: merge - config: - bgp_as: 64496 - networks: - - prefix: 203.0.113.0 - masklen: 27 - route_map: RMAP_1 - - - prefix: 203.0.113.32 - masklen: 27 - route_map: RMAP_2 - -- ansible.builtin.assert: - that: - - result.changed == True - - "'router bgp 64496' in result.commands" - - "'network 203.0.113.0/27 route-map RMAP_1' in result.commands" - - "'network 203.0.113.32/27 route-map RMAP_2' in result.commands" - -- name: Configure root-level networks for BGP (idempotent) - become: true - register: result - arista.eos.eos_bgp: *id004 - -- ansible.builtin.assert: - that: - - result.changed == false - -- name: Configure root-level networks for BGP with operation replace - become: true - register: result - arista.eos.eos_bgp: &id005 - operation: replace - config: - bgp_as: 64496 - networks: - - prefix: 203.0.113.0 - masklen: 27 - route_map: RMAP_1 - - - prefix: 198.51.100.16 - masklen: 28 - -- ansible.builtin.assert: - that: - - result.changed == True - - "'router bgp 64496' in result.commands" - - "'network 198.51.100.16/28' in result.commands" - - "'no network 203.0.113.32/27' in result.commands" - -- name: Configure root-level networks for BGP with operation replace (idempotent) - become: true - register: result - arista.eos.eos_bgp: *id005 - -- ansible.builtin.assert: - that: - - result.changed == false - -- name: Configure BGP route redistribute information - become: true - register: result - arista.eos.eos_bgp: &id006 - operation: merge - config: - bgp_as: 64496 - redistribute: - - protocol: ospf - route_map: RMAP_1 - - - protocol: rip - -- ansible.builtin.assert: - that: - - result.changed == true - - "'router bgp 64496' in result.commands" - - "'redistribute ospf route-map RMAP_1' in result.commands" - - "'redistribute rip' in result.commands" - -- name: Configure BGP route redistribute information (idempotent) - become: true - register: result - arista.eos.eos_bgp: *id006 - -- ansible.builtin.assert: - that: - - result.changed == false - -- name: Configure BGP route redistribute information with operation replace - become: true - register: result - arista.eos.eos_bgp: &id007 - operation: replace - config: - bgp_as: 64496 - redistribute: - - protocol: ospf - route_map: RMAP_1 - - - protocol: static - route_map: RMAP_2 - -- ansible.builtin.assert: - that: - - result.changed == true - - "'redistribute static route-map RMAP_2' in result.commands" - - "'no redistribute rip' in result.commands" - -- name: Configure BGP route redistribute information with operation replace (idempotent) - become: true - register: result - arista.eos.eos_bgp: *id007 - -- ansible.builtin.assert: - that: - - result.changed == false - -- name: Configure BGP neighbors under address family mode - become: true - register: result - arista.eos.eos_bgp: &id008 - operation: merge - config: - bgp_as: 64496 - address_family: - - afi: ipv4 - neighbors: - - neighbor: 203.0.113.10 - activate: true - default_originate: true - - - neighbor: 192.0.2.15 - activate: true - graceful_restart: false - -- ansible.builtin.assert: - that: - - result.changed == true - - "'router bgp 64496' in result.commands" - - "'address-family ipv4' in result.commands" - - "'neighbor 203.0.113.10 activate' in result.commands" - - "'neighbor 203.0.113.10 default-originate' in result.commands" - - "'neighbor 192.0.2.15 activate' in result.commands" - - "'no neighbor 192.0.2.15 graceful-restart' in result.commands" - -- name: Configure BGP neighbors under address family mode (idempotent) - become: true - register: result - arista.eos.eos_bgp: *id008 - -- ansible.builtin.assert: - that: - - result.changed == false - -- name: Configure networks under address family - become: true - register: result - arista.eos.eos_bgp: &id009 - operation: merge - config: - bgp_as: 64496 - address_family: - - afi: ipv4 - networks: - - prefix: 198.51.100.48 - masklen: 28 - route_map: RMAP_1 - - - prefix: 192.0.2.64 - masklen: 27 - - - prefix: 203.0.113.160 - masklen: 27 - route_map: RMAP_2 - - - afi: ipv6 - networks: - - prefix: "2001:db8::" - masklen: 33 - -- ansible.builtin.assert: - that: - - result.changed == true - - "'router bgp 64496' in result.commands" - - "'address-family ipv4' in result.commands" - - "'network 198.51.100.48/28 route-map RMAP_1' in result.commands" - - "'network 192.0.2.64/27' in result.commands" - - "'network 203.0.113.160/27 route-map RMAP_2' in result.commands" - - "'address-family ipv6' in result.commands" - - "'network 2001:db8::/33' in result.commands" - -- name: Configure networks under address family (idempotent) - become: true - register: result - arista.eos.eos_bgp: *id009 - -- ansible.builtin.assert: - that: - - result.changed == false - -- name: Configure networks under address family with operation replace - become: true - register: result - arista.eos.eos_bgp: &id010 - operation: replace - config: - bgp_as: 64496 - address_family: - - afi: ipv4 - networks: - - prefix: 198.51.100.80 - masklen: 28 - - - prefix: 192.0.2.64 - masklen: 27 - - - prefix: 203.0.113.192 - masklen: 27 - - - afi: ipv6 - networks: - - prefix: "2001:db8:1000::" - masklen: 37 - -- ansible.builtin.assert: - that: - - result.changed == true - - '"router bgp 64496" in result.commands' - - '"address-family ipv4" in result.commands' - - '"network 198.51.100.80/28" in result.commands' - - '"network 203.0.113.192/27" in result.commands' - - '"no network 198.51.100.48/28" in result.commands' - - '"no network 203.0.113.160/27" in result.commands' - - '"address-family ipv6" in result.commands' - - '"network 2001:db8:1000::/37" in result.commands' - - '"no network 2001:db8::/33" in result.commands' - -- name: Configure networks under address family with operation replace (idempotent) - become: true - register: result - arista.eos.eos_bgp: *id010 - -- ansible.builtin.assert: - that: - - result.changed == false - -- name: Override all the exisiting BGP config - become: true - register: result - arista.eos.eos_bgp: - operation: override - config: - bgp_as: 64497 - router_id: 192.0.2.10 - log_neighbor_changes: true - -- ansible.builtin.assert: - that: - - result.changed == true - - "'no router bgp 64496' in result.commands" - - "'router bgp 64497' in result.commands" - - "'router-id 192.0.2.10' in result.commands" - - "'bgp log-neighbor-changes' in result.commands" - -- name: Teardown - become: true - register: result - arista.eos.eos_bgp: *id011 - -- ansible.builtin.assert: - that: - - result.changed == true - - "'no router bgp 64497' in result.commands" - -- name: Teardown again (idempotent) - become: true - register: result - arista.eos.eos_bgp: *id011 - -- ansible.builtin.assert: - that: - - result.changed == false - -- ansible.builtin.debug: msg="END eos cli/eos_bgp.yaml on connection={{ ansible_connection }}" diff --git a/ansible_collections/arista/eos/tests/integration/targets/eos_config/tests/cli/config.yaml b/ansible_collections/arista/eos/tests/integration/targets/eos_config/tests/cli/config.yaml index 892b7f1e7..0b1dbc134 100644 --- a/ansible_collections/arista/eos/tests/integration/targets/eos_config/tests/cli/config.yaml +++ b/ansible_collections/arista/eos/tests/integration/targets/eos_config/tests/cli/config.yaml @@ -17,13 +17,13 @@ become: true register: result arista.eos.eos_config: - lines: hostname foo + lines: hostname int_tests config: "{{ config.stdout[0] }}" - ansible.builtin.assert: that: - result.changed == true - - "'hostname foo' in result.updates" + - "'hostname int_tests' in result.updates" - name: get current running-config become: true @@ -35,7 +35,7 @@ become: true register: result arista.eos.eos_config: - lines: hostname foo + lines: hostname int_tests config: "{{ config.stdout[0] }}" - ansible.builtin.assert: diff --git a/ansible_collections/arista/eos/tests/integration/targets/eos_config/tests/cli/toplevel.yaml b/ansible_collections/arista/eos/tests/integration/targets/eos_config/tests/cli/toplevel.yaml index e3a950986..ab8b29997 100644 --- a/ansible_collections/arista/eos/tests/integration/targets/eos_config/tests/cli/toplevel.yaml +++ b/ansible_collections/arista/eos/tests/integration/targets/eos_config/tests/cli/toplevel.yaml @@ -4,6 +4,12 @@ - name: setup become: true arista.eos.eos_config: + lines: + - no hostname + +- name: setup + become: true + arista.eos.eos_config: lines: hostname {{ inventory_hostname_short }} match: none diff --git a/ansible_collections/arista/eos/tests/integration/targets/eos_config/tests/cli/toplevel_after.yaml b/ansible_collections/arista/eos/tests/integration/targets/eos_config/tests/cli/toplevel_after.yaml index 66a60c0ae..2a3a304dc 100644 --- a/ansible_collections/arista/eos/tests/integration/targets/eos_config/tests/cli/toplevel_after.yaml +++ b/ansible_collections/arista/eos/tests/integration/targets/eos_config/tests/cli/toplevel_after.yaml @@ -7,6 +7,12 @@ become: true arista.eos.eos_config: lines: + - no hostname + +- name: setup + become: true + arista.eos.eos_config: + lines: - snmp-server contact ansible - hostname {{ inventory_hostname_short }} match: none diff --git a/ansible_collections/arista/eos/tests/integration/targets/eos_config/tests/cli/toplevel_before.yaml b/ansible_collections/arista/eos/tests/integration/targets/eos_config/tests/cli/toplevel_before.yaml index 949767b2e..33f1a813d 100644 --- a/ansible_collections/arista/eos/tests/integration/targets/eos_config/tests/cli/toplevel_before.yaml +++ b/ansible_collections/arista/eos/tests/integration/targets/eos_config/tests/cli/toplevel_before.yaml @@ -7,6 +7,12 @@ become: true arista.eos.eos_config: lines: + - no hostname + +- name: setup + become: true + arista.eos.eos_config: + lines: - snmp-server contact ansible - hostname {{ inventory_hostname_short }} match: none diff --git a/ansible_collections/arista/eos/tests/integration/targets/eos_facts/tests/cli/network_facts b/ansible_collections/arista/eos/tests/integration/targets/eos_facts/tests/cli/network_facts new file mode 100644 index 000000000..32c715cf9 --- /dev/null +++ b/ansible_collections/arista/eos/tests/integration/targets/eos_facts/tests/cli/network_facts @@ -0,0 +1,15 @@ +--- +- ansible.builtin.debug: msg="START cli/network_resource_facts.yaml on connection={{ ansible_connection }}" + +- name: Gather arista network resource facts + arista.eos.eos_facts: + gather_subset: config + gather_network_resources: + - 'static_routes' + register: result + +- name: Assert that facts gathered was correctly generated + ansible.builtin.assert: + that: + - "result['ansible_facts']['ansible_network_resources']['static_routes'] == []" +- ansible.builtin.debug: msg="END cli/network_resource_facts.yaml on connection={{ ansible_connection }}" diff --git a/ansible_collections/arista/eos/tests/integration/targets/eos_logging/defaults/main.yaml b/ansible_collections/arista/eos/tests/integration/targets/eos_logging/defaults/main.yaml deleted file mode 100644 index 5f709c5aa..000000000 --- a/ansible_collections/arista/eos/tests/integration/targets/eos_logging/defaults/main.yaml +++ /dev/null @@ -1,2 +0,0 @@ ---- -testcase: "*" diff --git a/ansible_collections/arista/eos/tests/integration/targets/eos_logging/meta/main.yaml b/ansible_collections/arista/eos/tests/integration/targets/eos_logging/meta/main.yaml deleted file mode 100644 index d29186fe0..000000000 --- a/ansible_collections/arista/eos/tests/integration/targets/eos_logging/meta/main.yaml +++ /dev/null @@ -1,3 +0,0 @@ ---- -dependencies: - - prepare_eos_tests diff --git a/ansible_collections/arista/eos/tests/integration/targets/eos_logging/tasks/cli.yaml b/ansible_collections/arista/eos/tests/integration/targets/eos_logging/tasks/cli.yaml deleted file mode 100644 index 57bedc474..000000000 --- a/ansible_collections/arista/eos/tests/integration/targets/eos_logging/tasks/cli.yaml +++ /dev/null @@ -1,19 +0,0 @@ ---- -- name: Collect all cli test cases - ansible.builtin.find: - paths: "{{ role_path }}/tests/cli" - patterns: "{{ testcase }}.yaml" - register: test_cases - delegate_to: localhost - -- name: Set test_items - ansible.builtin.set_fact: - test_items: "{{ test_cases.files | map(attribute='path') | list }}" - -- name: Run test cases (connection=ansible.netcommon.network_cli) - ansible.builtin.include_tasks: "{{ test_case_to_run }}" - with_items: "{{ test_items }}" - loop_control: - loop_var: test_case_to_run - vars: - ansible_connection: ansible.netcommon.network_cli diff --git a/ansible_collections/arista/eos/tests/integration/targets/eos_logging/tasks/eapi.yaml b/ansible_collections/arista/eos/tests/integration/targets/eos_logging/tasks/eapi.yaml deleted file mode 100644 index a5cc3bac9..000000000 --- a/ansible_collections/arista/eos/tests/integration/targets/eos_logging/tasks/eapi.yaml +++ /dev/null @@ -1,19 +0,0 @@ ---- -- name: Collect all eapi test cases - ansible.builtin.find: - paths: "{{ role_path }}/tests/eapi" - patterns: "{{ testcase }}.yaml" - delegate_to: localhost - register: test_cases - -- name: Set test_items - ansible.builtin.set_fact: - test_items: "{{ test_cases.files | map(attribute='path') | list }}" - -- name: Run test cases (connection=ansible.netcommon.httpapi) - ansible.builtin.include_tasks: "{{ test_case_to_run }}" - with_items: "{{ test_items }}" - loop_control: - loop_var: test_case_to_run - vars: - ansible_connection: ansible.netcommon.httpapi diff --git a/ansible_collections/arista/eos/tests/integration/targets/eos_logging/tasks/main.yaml b/ansible_collections/arista/eos/tests/integration/targets/eos_logging/tasks/main.yaml deleted file mode 100644 index a821bf6be..000000000 --- a/ansible_collections/arista/eos/tests/integration/targets/eos_logging/tasks/main.yaml +++ /dev/null @@ -1,10 +0,0 @@ ---- -- name: Invoke cli - ansible.builtin.include_tasks: cli.yaml - tags: - - network_cli - -- name: Invoke eapi - ansible.builtin.include_tasks: eapi.yaml - tags: - - httpapi diff --git a/ansible_collections/arista/eos/tests/integration/targets/eos_logging/tests/cli/basic.yaml b/ansible_collections/arista/eos/tests/integration/targets/eos_logging/tests/cli/basic.yaml deleted file mode 100644 index 56083e8ba..000000000 --- a/ansible_collections/arista/eos/tests/integration/targets/eos_logging/tests/cli/basic.yaml +++ /dev/null @@ -1,154 +0,0 @@ ---- -- ansible.builtin.debug: msg="START cli/basic.yaml on connection={{ ansible_connection }}" - -- name: Set up host logging - become: true - register: result - arista.eos.eos_logging: - dest: host - name: 172.16.0.1 - state: present - -- ansible.builtin.assert: - that: - - result.changed == true - - '"logging host 172.16.0.1" in result.commands' - -- name: Set up host logging again (idempotent) - become: true - register: result - arista.eos.eos_logging: - dest: host - name: 172.16.0.1 - state: present - -- ansible.builtin.assert: - that: - - result.changed == false - -- name: Delete/disable host logging - become: true - register: result - arista.eos.eos_logging: - dest: host - name: 172.16.0.1 - state: absent - -- ansible.builtin.assert: - that: - - result.changed == true - - '"no logging host 172.16.0.1" in result.commands' - -- name: Delete/disable host logging (idempotent) - become: true - register: result - arista.eos.eos_logging: - dest: host - name: 172.16.0.1 - state: absent - -- ansible.builtin.assert: - that: - - result.changed == false - -- name: Console logging with level warnings - become: true - register: result - arista.eos.eos_logging: - dest: console - level: warnings - state: present - -- ansible.builtin.assert: - that: - - result.changed == true - - '"logging console warnings" in result.commands' - -- name: Configure buffer size - become: true - register: result - arista.eos.eos_logging: - dest: buffered - size: 480000 - -- ansible.builtin.assert: - that: - - result.changed == true - - '"logging buffered 480000" in result.commands' - -- name: Set up logging destination and facility at the same time - become: true - register: result - arista.eos.eos_logging: - dest: buffered - size: 4096 - facility: local7 - level: informational - state: present - -- ansible.builtin.assert: - that: - - result.changed == true - - '"logging buffered 4096 informational" in result.commands' - - '"logging facility local7" in result.commands' - -- name: Set up logging destination and facility at the same time again (idempotent) - become: true - register: result - arista.eos.eos_logging: - dest: buffered - size: 4096 - facility: local7 - level: informational - state: present - -- ansible.builtin.assert: - that: - - result.changed == false - -- name: Set up logging facility alone - become: true - register: result - arista.eos.eos_logging: - facility: local2 - state: present - -- ansible.builtin.assert: - that: - - result.changed == true - - '"logging facility local2" in result.commands' - -- name: Set up logging facility (idempotent) - become: true - register: result - arista.eos.eos_logging: - facility: local2 - state: present - -- ansible.builtin.assert: - that: - - result.changed == false - -- name: remove logging as collection tearDown - become: true - register: result - arista.eos.eos_logging: - aggregate: - - dest: console - level: warnings - state: absent - - - dest: buffered - level: informational - size: 4096 - state: absent - - - facility: local2 - state: absent - -- ansible.builtin.assert: - that: - - result.changed == true - - '"no logging console" in result.commands' - - '"no logging buffered" in result.commands' - - '"no logging facility local2" in result.commands' diff --git a/ansible_collections/arista/eos/tests/integration/targets/eos_logging/tests/eapi/basic.yaml b/ansible_collections/arista/eos/tests/integration/targets/eos_logging/tests/eapi/basic.yaml deleted file mode 100644 index ef1cade8c..000000000 --- a/ansible_collections/arista/eos/tests/integration/targets/eos_logging/tests/eapi/basic.yaml +++ /dev/null @@ -1,96 +0,0 @@ ---- -- ansible.builtin.debug: msg="START eapi/basic.yaml on connection={{ ansible_connection }}" - -- name: Set up host logging - become: true - register: result - arista.eos.eos_logging: - dest: host - name: 172.16.0.1 - state: present - -- ansible.builtin.assert: - that: - - result.changed == true - - '"logging host 172.16.0.1" in result.commands' - -- name: Set up host logging again (idempotent) - become: true - register: result - arista.eos.eos_logging: - dest: host - name: 172.16.0.1 - state: present - -- ansible.builtin.assert: - that: - - result.changed == false - -- name: Delete/disable host logging - become: true - register: result - arista.eos.eos_logging: - dest: host - name: 172.16.0.1 - state: absent - -- ansible.builtin.assert: - that: - - result.changed == true - - '"no logging host 172.16.0.1" in result.commands' - -- name: Delete/disable host logging (idempotent) - become: true - register: result - arista.eos.eos_logging: - dest: host - name: 172.16.0.1 - state: absent - -- ansible.builtin.assert: - that: - - result.changed == false - -- name: Console logging with level warnings - become: true - register: result - arista.eos.eos_logging: - dest: console - level: warnings - state: present - -- ansible.builtin.assert: - that: - - result.changed == true - - '"logging console warnings" in result.commands' - -- name: Configure buffer size - become: true - register: result - arista.eos.eos_logging: - dest: buffered - size: 480000 - -- ansible.builtin.assert: - that: - - result.changed == true - - '"logging buffered 480000" in result.commands' - -- name: remove logging as collection tearDown - become: true - register: result - arista.eos.eos_logging: - aggregate: - - dest: console - level: warnings - state: absent - - - dest: buffered - size: 480000 - state: absent - -- ansible.builtin.assert: - that: - - result.changed == true - - '"no logging console" in result.commands' - - '"no logging buffered" in result.commands' diff --git a/ansible_collections/arista/eos/tests/integration/targets/eos_ospfv3/tests/common/merged.yaml b/ansible_collections/arista/eos/tests/integration/targets/eos_ospfv3/tests/common/merged.yaml index 430ac7b4c..77b4774b7 100644 --- a/ansible_collections/arista/eos/tests/integration/targets/eos_ospfv3/tests/common/merged.yaml +++ b/ansible_collections/arista/eos/tests/integration/targets/eos_ospfv3/tests/common/merged.yaml @@ -109,7 +109,7 @@ - result.commands|length == 0 - result.changed == false - - name: merge given ospfv3 configuration with timers.throttle option (expect warning). + - name: merge given ospfv3 configuration with timers option. become: true register: result arista.eos.eos_ospfv3: @@ -142,19 +142,11 @@ fips_restrictions: true timers: pacing: 7 - throttle: - spf: true - initial: 56 - max: 56 - min: 56 vrf: "default" - - ansible.builtin.assert: - that: "'The \\'timers\\' argument has been changed to have separate \\'lsa\\' and \\'spf\\' keys and \\'throttle\\' has been deprecated.' in result.warnings[0]" - - ansible.builtin.include_tasks: _remove_config.yaml - - name: merge given ospfv3 configuration with timers.lsa option (expect warning). + - name: merge given ospfv3 configuration with timers.lsa option. become: true register: result arista.eos.eos_ospfv3: @@ -174,7 +166,6 @@ - ansible.builtin.assert: that: - - "'\\'timers lsa arrival\\' has changed to \\'timers lsa rx min interval\\'' in result.warnings[0]" - '"timers lsa rx min interval 33" in result["commands"]' always: diff --git a/ansible_collections/arista/eos/tests/integration/targets/eos_user/tests/cli/auth.yaml b/ansible_collections/arista/eos/tests/integration/targets/eos_user/tests/cli/auth.yaml index 12f6bfe65..339a2b77e 100644 --- a/ansible_collections/arista/eos/tests/integration/targets/eos_user/tests/cli/auth.yaml +++ b/ansible_collections/arista/eos/tests/integration/targets/eos_user/tests/cli/auth.yaml @@ -16,6 +16,7 @@ -o StrictHostKeyChecking=no show version responses: (?i)password: pass123 + ignore_errors: true - name: test login with invalid password (should fail) expect: |