mirror of
https://github.com/ansible-collections/community.general.git
synced 2025-07-23 13:20:23 -07:00
Fixes nxos_l2_interface tests (#34514)
* Update nxos tests that got missed in the first pass * Add setup for setting interfaces to layer2
This commit is contained in:
parent
e9bb5da37e
commit
c5d0b15160
25 changed files with 103 additions and 45 deletions
|
@ -3,12 +3,14 @@
|
|||
find:
|
||||
paths: "{{ role_path }}/tests/common"
|
||||
patterns: "{{ testcase }}.yaml"
|
||||
connection: local
|
||||
register: test_cases
|
||||
|
||||
- name: collect nxapi test cases
|
||||
find:
|
||||
paths: "{{ role_path }}/tests/nxapi"
|
||||
patterns: "{{ testcase }}.yaml"
|
||||
connection: local
|
||||
register: nxapi_cases
|
||||
|
||||
- set_fact:
|
||||
|
@ -18,8 +20,8 @@
|
|||
- name: set test_items
|
||||
set_fact: test_items="{{ test_cases.files | map(attribute='path') | list }}"
|
||||
|
||||
- name: run test case
|
||||
include: "{{ test_case_to_run }} connection={{ nxapi }}"
|
||||
- name: run test cases (connection=local)
|
||||
include: "{{ test_case_to_run }} ansible_connection=local connection={{ nxapi }}"
|
||||
with_items: "{{ test_items }}"
|
||||
loop_control:
|
||||
loop_var: test_case_to_run
|
||||
|
|
|
@ -12,6 +12,13 @@
|
|||
vlan_range: "6,15"
|
||||
provider: "{{ connection }}"
|
||||
|
||||
- name: Setup - Ensure interfaces are layer2
|
||||
nxos_interface:
|
||||
aggregate:
|
||||
- { name: "{{ intname1 }}" }
|
||||
- { name: "{{ intname2 }}" }
|
||||
mode: layer2
|
||||
|
||||
- name: Setup - Remove interface aggregate before testing
|
||||
nxos_l2_interface:
|
||||
aggregate:
|
||||
|
|
|
@ -16,6 +16,11 @@
|
|||
provider: "{{ connection }}"
|
||||
ignore_errors: yes
|
||||
|
||||
- name: Setup - Ensure interface is layer2
|
||||
nxos_interface:
|
||||
interface: "{{ intname }}"
|
||||
mode: layer2
|
||||
|
||||
- name: "Setup vlans"
|
||||
nxos_vlan:
|
||||
vlan_range: "5-10,20"
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue