|
|
|
@ -3,12 +3,14 @@
|
|
|
|
find:
|
|
|
|
find:
|
|
|
|
paths: "{{ role_path }}/tests/common"
|
|
|
|
paths: "{{ role_path }}/tests/common"
|
|
|
|
patterns: "{{ testcase }}.yaml"
|
|
|
|
patterns: "{{ testcase }}.yaml"
|
|
|
|
|
|
|
|
connection: local
|
|
|
|
register: test_cases
|
|
|
|
register: test_cases
|
|
|
|
|
|
|
|
|
|
|
|
- name: collect nxapi test cases
|
|
|
|
- name: collect nxapi test cases
|
|
|
|
find:
|
|
|
|
find:
|
|
|
|
paths: "{{ role_path }}/tests/nxapi"
|
|
|
|
paths: "{{ role_path }}/tests/nxapi"
|
|
|
|
patterns: "{{ testcase }}.yaml"
|
|
|
|
patterns: "{{ testcase }}.yaml"
|
|
|
|
|
|
|
|
connection: local
|
|
|
|
register: nxapi_cases
|
|
|
|
register: nxapi_cases
|
|
|
|
|
|
|
|
|
|
|
|
- set_fact:
|
|
|
|
- set_fact:
|
|
|
|
@ -18,8 +20,8 @@
|
|
|
|
- name: set test_items
|
|
|
|
- name: set test_items
|
|
|
|
set_fact: test_items="{{ test_cases.files | map(attribute='path') | list }}"
|
|
|
|
set_fact: test_items="{{ test_cases.files | map(attribute='path') | list }}"
|
|
|
|
|
|
|
|
|
|
|
|
- name: run test case
|
|
|
|
- name: run test cases (connection=local)
|
|
|
|
include: "{{ test_case_to_run }} connection={{ nxapi }}"
|
|
|
|
include: "{{ test_case_to_run }} ansible_connection=local connection={{ nxapi }}"
|
|
|
|
with_items: "{{ test_items }}"
|
|
|
|
with_items: "{{ test_items }}"
|
|
|
|
loop_control:
|
|
|
|
loop_control:
|
|
|
|
loop_var: test_case_to_run
|
|
|
|
loop_var: test_case_to_run
|
|
|
|
|