diff --git a/test/integration/targets/nxos_vrf_interface/tasks/cli.yaml b/test/integration/targets/nxos_vrf_interface/tasks/cli.yaml index d675462dd0..0ab3f8f908 100644 --- a/test/integration/targets/nxos_vrf_interface/tasks/cli.yaml +++ b/test/integration/targets/nxos_vrf_interface/tasks/cli.yaml @@ -1,15 +1,25 @@ --- -- name: collect all cli test cases +- name: collect common cli test cases + find: + paths: "{{ role_path }}/tests/common" + patterns: "{{ testcase }}.yaml" + register: test_cases + +- name: collect cli test cases find: paths: "{{ role_path }}/tests/cli" patterns: "{{ testcase }}.yaml" - register: test_cases + register: cli_cases + +- set_fact: + test_cases: + files: "{{ test_cases.files }} + {{ cli_cases.files }}" - name: set test_items set_fact: test_items="{{ test_cases.files | map(attribute='path') | list }}" - name: run test case - include: "{{ test_case_to_run }}" + include: "{{ test_case_to_run }} connection={{ cli }}" with_items: "{{ test_items }}" loop_control: loop_var: test_case_to_run diff --git a/test/integration/targets/nxos_vrf_interface/tasks/nxapi.yaml b/test/integration/targets/nxos_vrf_interface/tasks/nxapi.yaml index ea525379f7..e071f293a2 100644 --- a/test/integration/targets/nxos_vrf_interface/tasks/nxapi.yaml +++ b/test/integration/targets/nxos_vrf_interface/tasks/nxapi.yaml @@ -1,9 +1,19 @@ --- -- name: collect all nxapi test cases +- name: collect common nxapi test cases + find: + paths: "{{ role_path }}/tests/common" + patterns: "{{ testcase }}.yaml" + register: test_cases + +- name: collect nxapi test cases find: paths: "{{ role_path }}/tests/nxapi" patterns: "{{ testcase }}.yaml" - register: test_cases + register: nxapi_cases + +- set_fact: + test_cases: + files: "{{ test_cases.files }} + {{ nxapi_cases.files }}" - name: set test_items set_fact: test_items="{{ test_cases.files | map(attribute='path') | list }}" @@ -16,7 +26,7 @@ provider: "{{ cli }}" - name: run test case - include: "{{ test_case_to_run }}" + include: "{{ test_case_to_run }} connection={{ nxapi }}" with_items: "{{ test_items }}" loop_control: loop_var: test_case_to_run diff --git a/test/integration/targets/nxos_vrf_interface/tests/cli/sanity.yaml b/test/integration/targets/nxos_vrf_interface/tests/cli/sanity.yaml deleted file mode 100644 index 5cdeee4a98..0000000000 --- a/test/integration/targets/nxos_vrf_interface/tests/cli/sanity.yaml +++ /dev/null @@ -1,4 +0,0 @@ ---- -- set_fact: connection="{{ cli }}" - -- import_tasks: targets/nxos_vrf_interface/tests/common/sanity.yaml diff --git a/test/integration/targets/nxos_vrf_interface/tests/nxapi/sanity.yaml b/test/integration/targets/nxos_vrf_interface/tests/nxapi/sanity.yaml deleted file mode 100644 index d239bab0f8..0000000000 --- a/test/integration/targets/nxos_vrf_interface/tests/nxapi/sanity.yaml +++ /dev/null @@ -1,4 +0,0 @@ ---- -- set_fact: connection="{{ nxapi }}" - -- import_tasks: targets/nxos_vrf_interface/tests/common/sanity.yaml diff --git a/test/integration/targets/nxos_vrrp/tasks/cli.yaml b/test/integration/targets/nxos_vrrp/tasks/cli.yaml index d675462dd0..0ab3f8f908 100644 --- a/test/integration/targets/nxos_vrrp/tasks/cli.yaml +++ b/test/integration/targets/nxos_vrrp/tasks/cli.yaml @@ -1,15 +1,25 @@ --- -- name: collect all cli test cases +- name: collect common cli test cases + find: + paths: "{{ role_path }}/tests/common" + patterns: "{{ testcase }}.yaml" + register: test_cases + +- name: collect cli test cases find: paths: "{{ role_path }}/tests/cli" patterns: "{{ testcase }}.yaml" - register: test_cases + register: cli_cases + +- set_fact: + test_cases: + files: "{{ test_cases.files }} + {{ cli_cases.files }}" - name: set test_items set_fact: test_items="{{ test_cases.files | map(attribute='path') | list }}" - name: run test case - include: "{{ test_case_to_run }}" + include: "{{ test_case_to_run }} connection={{ cli }}" with_items: "{{ test_items }}" loop_control: loop_var: test_case_to_run diff --git a/test/integration/targets/nxos_vrrp/tasks/nxapi.yaml b/test/integration/targets/nxos_vrrp/tasks/nxapi.yaml index ea525379f7..e071f293a2 100644 --- a/test/integration/targets/nxos_vrrp/tasks/nxapi.yaml +++ b/test/integration/targets/nxos_vrrp/tasks/nxapi.yaml @@ -1,9 +1,19 @@ --- -- name: collect all nxapi test cases +- name: collect common nxapi test cases + find: + paths: "{{ role_path }}/tests/common" + patterns: "{{ testcase }}.yaml" + register: test_cases + +- name: collect nxapi test cases find: paths: "{{ role_path }}/tests/nxapi" patterns: "{{ testcase }}.yaml" - register: test_cases + register: nxapi_cases + +- set_fact: + test_cases: + files: "{{ test_cases.files }} + {{ nxapi_cases.files }}" - name: set test_items set_fact: test_items="{{ test_cases.files | map(attribute='path') | list }}" @@ -16,7 +26,7 @@ provider: "{{ cli }}" - name: run test case - include: "{{ test_case_to_run }}" + include: "{{ test_case_to_run }} connection={{ nxapi }}" with_items: "{{ test_items }}" loop_control: loop_var: test_case_to_run diff --git a/test/integration/targets/nxos_vtp_domain/tasks/cli.yaml b/test/integration/targets/nxos_vtp_domain/tasks/cli.yaml index d675462dd0..0ab3f8f908 100644 --- a/test/integration/targets/nxos_vtp_domain/tasks/cli.yaml +++ b/test/integration/targets/nxos_vtp_domain/tasks/cli.yaml @@ -1,15 +1,25 @@ --- -- name: collect all cli test cases +- name: collect common cli test cases + find: + paths: "{{ role_path }}/tests/common" + patterns: "{{ testcase }}.yaml" + register: test_cases + +- name: collect cli test cases find: paths: "{{ role_path }}/tests/cli" patterns: "{{ testcase }}.yaml" - register: test_cases + register: cli_cases + +- set_fact: + test_cases: + files: "{{ test_cases.files }} + {{ cli_cases.files }}" - name: set test_items set_fact: test_items="{{ test_cases.files | map(attribute='path') | list }}" - name: run test case - include: "{{ test_case_to_run }}" + include: "{{ test_case_to_run }} connection={{ cli }}" with_items: "{{ test_items }}" loop_control: loop_var: test_case_to_run diff --git a/test/integration/targets/nxos_vtp_domain/tasks/nxapi.yaml b/test/integration/targets/nxos_vtp_domain/tasks/nxapi.yaml index ea525379f7..e071f293a2 100644 --- a/test/integration/targets/nxos_vtp_domain/tasks/nxapi.yaml +++ b/test/integration/targets/nxos_vtp_domain/tasks/nxapi.yaml @@ -1,9 +1,19 @@ --- -- name: collect all nxapi test cases +- name: collect common nxapi test cases + find: + paths: "{{ role_path }}/tests/common" + patterns: "{{ testcase }}.yaml" + register: test_cases + +- name: collect nxapi test cases find: paths: "{{ role_path }}/tests/nxapi" patterns: "{{ testcase }}.yaml" - register: test_cases + register: nxapi_cases + +- set_fact: + test_cases: + files: "{{ test_cases.files }} + {{ nxapi_cases.files }}" - name: set test_items set_fact: test_items="{{ test_cases.files | map(attribute='path') | list }}" @@ -16,7 +26,7 @@ provider: "{{ cli }}" - name: run test case - include: "{{ test_case_to_run }}" + include: "{{ test_case_to_run }} connection={{ nxapi }}" with_items: "{{ test_items }}" loop_control: loop_var: test_case_to_run diff --git a/test/integration/targets/nxos_vtp_domain/tests/cli/sanity.yaml b/test/integration/targets/nxos_vtp_domain/tests/cli/sanity.yaml deleted file mode 100644 index 5454ddebad..0000000000 --- a/test/integration/targets/nxos_vtp_domain/tests/cli/sanity.yaml +++ /dev/null @@ -1,23 +0,0 @@ ---- -- debug: msg="START TRANSPORT:CLI nxos_vtp_domain sanity test" - -- block: - - name: enable feature vtp - nxos_feature: - feature: vtp - state: enabled - provider: "{{ cli }}" - - - name: configure vtp domain - nxos_vtp_domain: - domain: ntc - provider: "{{ cli }}" - - always: - - name: disable feature vtp - nxos_feature: - feature: vtp - state: disabled - provider: "{{ cli }}" - -- debug: msg="END TRANSPORT:CLI nxos_vtp_domain sanity test" diff --git a/test/integration/targets/nxos_vtp_domain/tests/common/sanity.yaml b/test/integration/targets/nxos_vtp_domain/tests/common/sanity.yaml new file mode 100644 index 0000000000..e8b42925cb --- /dev/null +++ b/test/integration/targets/nxos_vtp_domain/tests/common/sanity.yaml @@ -0,0 +1,23 @@ +--- +- debug: msg="START TRANSPORT:{{ connection.transport }} nxos_vtp_domain sanity test" + +- block: + - name: enable feature vtp + nxos_feature: + feature: vtp + state: enabled + provider: "{{ connection }}" + + - name: configure vtp domain + nxos_vtp_domain: + domain: ntc + provider: "{{ connection }}" + + always: + - name: disable feature vtp + nxos_feature: + feature: vtp + state: disabled + provider: "{{ connection }}" + +- debug: msg="END TRANSPORT:{{ connection.transport }} nxos_vtp_domain sanity test" diff --git a/test/integration/targets/nxos_vtp_domain/tests/nxapi/sanity.yaml b/test/integration/targets/nxos_vtp_domain/tests/nxapi/sanity.yaml deleted file mode 100644 index 377fae6976..0000000000 --- a/test/integration/targets/nxos_vtp_domain/tests/nxapi/sanity.yaml +++ /dev/null @@ -1,23 +0,0 @@ ---- -- debug: msg="START TRANSPORT:NXAPI nxos_vtp_domain sanity test" - -- block: - - name: enable feature vtp - nxos_feature: - feature: vtp - state: enabled - provider: "{{ nxapi }}" - - - name: configure vtp domain - nxos_vtp_domain: - domain: ntc - provider: "{{ nxapi }}" - - always: - - name: disable feature vtp - nxos_feature: - feature: vtp - state: disabled - provider: "{{ nxapi }}" - -- debug: msg="END TRANSPORT:NXAPI nxos_vtp_domain sanity test" diff --git a/test/integration/targets/nxos_vtp_password/tasks/cli.yaml b/test/integration/targets/nxos_vtp_password/tasks/cli.yaml index d675462dd0..0ab3f8f908 100644 --- a/test/integration/targets/nxos_vtp_password/tasks/cli.yaml +++ b/test/integration/targets/nxos_vtp_password/tasks/cli.yaml @@ -1,15 +1,25 @@ --- -- name: collect all cli test cases +- name: collect common cli test cases + find: + paths: "{{ role_path }}/tests/common" + patterns: "{{ testcase }}.yaml" + register: test_cases + +- name: collect cli test cases find: paths: "{{ role_path }}/tests/cli" patterns: "{{ testcase }}.yaml" - register: test_cases + register: cli_cases + +- set_fact: + test_cases: + files: "{{ test_cases.files }} + {{ cli_cases.files }}" - name: set test_items set_fact: test_items="{{ test_cases.files | map(attribute='path') | list }}" - name: run test case - include: "{{ test_case_to_run }}" + include: "{{ test_case_to_run }} connection={{ cli }}" with_items: "{{ test_items }}" loop_control: loop_var: test_case_to_run diff --git a/test/integration/targets/nxos_vtp_password/tasks/nxapi.yaml b/test/integration/targets/nxos_vtp_password/tasks/nxapi.yaml index ea525379f7..e071f293a2 100644 --- a/test/integration/targets/nxos_vtp_password/tasks/nxapi.yaml +++ b/test/integration/targets/nxos_vtp_password/tasks/nxapi.yaml @@ -1,9 +1,19 @@ --- -- name: collect all nxapi test cases +- name: collect common nxapi test cases + find: + paths: "{{ role_path }}/tests/common" + patterns: "{{ testcase }}.yaml" + register: test_cases + +- name: collect nxapi test cases find: paths: "{{ role_path }}/tests/nxapi" patterns: "{{ testcase }}.yaml" - register: test_cases + register: nxapi_cases + +- set_fact: + test_cases: + files: "{{ test_cases.files }} + {{ nxapi_cases.files }}" - name: set test_items set_fact: test_items="{{ test_cases.files | map(attribute='path') | list }}" @@ -16,7 +26,7 @@ provider: "{{ cli }}" - name: run test case - include: "{{ test_case_to_run }}" + include: "{{ test_case_to_run }} connection={{ nxapi }}" with_items: "{{ test_items }}" loop_control: loop_var: test_case_to_run diff --git a/test/integration/targets/nxos_vtp_password/tests/cli/sanity.yaml b/test/integration/targets/nxos_vtp_password/tests/cli/sanity.yaml deleted file mode 100644 index 3e930f98dd..0000000000 --- a/test/integration/targets/nxos_vtp_password/tests/cli/sanity.yaml +++ /dev/null @@ -1,4 +0,0 @@ ---- -- set_fact: connection="{{ cli }}" - -- import_tasks: targets/nxos_vtp_password/tests/common/sanity.yaml diff --git a/test/integration/targets/nxos_vtp_password/tests/nxapi/sanity.yaml b/test/integration/targets/nxos_vtp_password/tests/nxapi/sanity.yaml deleted file mode 100644 index 326d4cafce..0000000000 --- a/test/integration/targets/nxos_vtp_password/tests/nxapi/sanity.yaml +++ /dev/null @@ -1,4 +0,0 @@ ---- -- set_fact: connection="{{ nxapi }}" - -- import_tasks: targets/nxos_vtp_password/tests/common/sanity.yaml diff --git a/test/integration/targets/nxos_vtp_version/tasks/cli.yaml b/test/integration/targets/nxos_vtp_version/tasks/cli.yaml index d675462dd0..0ab3f8f908 100644 --- a/test/integration/targets/nxos_vtp_version/tasks/cli.yaml +++ b/test/integration/targets/nxos_vtp_version/tasks/cli.yaml @@ -1,15 +1,25 @@ --- -- name: collect all cli test cases +- name: collect common cli test cases + find: + paths: "{{ role_path }}/tests/common" + patterns: "{{ testcase }}.yaml" + register: test_cases + +- name: collect cli test cases find: paths: "{{ role_path }}/tests/cli" patterns: "{{ testcase }}.yaml" - register: test_cases + register: cli_cases + +- set_fact: + test_cases: + files: "{{ test_cases.files }} + {{ cli_cases.files }}" - name: set test_items set_fact: test_items="{{ test_cases.files | map(attribute='path') | list }}" - name: run test case - include: "{{ test_case_to_run }}" + include: "{{ test_case_to_run }} connection={{ cli }}" with_items: "{{ test_items }}" loop_control: loop_var: test_case_to_run diff --git a/test/integration/targets/nxos_vtp_version/tasks/nxapi.yaml b/test/integration/targets/nxos_vtp_version/tasks/nxapi.yaml index ea525379f7..e071f293a2 100644 --- a/test/integration/targets/nxos_vtp_version/tasks/nxapi.yaml +++ b/test/integration/targets/nxos_vtp_version/tasks/nxapi.yaml @@ -1,9 +1,19 @@ --- -- name: collect all nxapi test cases +- name: collect common nxapi test cases + find: + paths: "{{ role_path }}/tests/common" + patterns: "{{ testcase }}.yaml" + register: test_cases + +- name: collect nxapi test cases find: paths: "{{ role_path }}/tests/nxapi" patterns: "{{ testcase }}.yaml" - register: test_cases + register: nxapi_cases + +- set_fact: + test_cases: + files: "{{ test_cases.files }} + {{ nxapi_cases.files }}" - name: set test_items set_fact: test_items="{{ test_cases.files | map(attribute='path') | list }}" @@ -16,7 +26,7 @@ provider: "{{ cli }}" - name: run test case - include: "{{ test_case_to_run }}" + include: "{{ test_case_to_run }} connection={{ nxapi }}" with_items: "{{ test_items }}" loop_control: loop_var: test_case_to_run diff --git a/test/integration/targets/nxos_vtp_version/tests/cli/sanity.yaml b/test/integration/targets/nxos_vtp_version/tests/cli/sanity.yaml deleted file mode 100644 index 6655cacc00..0000000000 --- a/test/integration/targets/nxos_vtp_version/tests/cli/sanity.yaml +++ /dev/null @@ -1,23 +0,0 @@ ---- -- debug: msg="START TRANSPORT:CLI nxos_vtp_version sanity test" - -- block: - - name: enable feature vtp - nxos_feature: - feature: vtp - state: enabled - provider: "{{ cli }}" - - - name: configure vtp version - nxos_vtp_version: - version: 2 - provider: "{{ cli }}" - - always: - - name: disable feature vtp - nxos_feature: - feature: vtp - state: disabled - provider: "{{ cli }}" - -- debug: msg="END TRANSPORT:CLI nxos_vtp_version sanity test" diff --git a/test/integration/targets/nxos_vtp_version/tests/common/sanity.yaml b/test/integration/targets/nxos_vtp_version/tests/common/sanity.yaml new file mode 100644 index 0000000000..8fbe61226d --- /dev/null +++ b/test/integration/targets/nxos_vtp_version/tests/common/sanity.yaml @@ -0,0 +1,23 @@ +--- +- debug: msg="START TRANSPORT:{{ connection.transport }} nxos_vtp_version sanity test" + +- block: + - name: enable feature vtp + nxos_feature: + feature: vtp + state: enabled + provider: "{{ connection }}" + + - name: configure vtp version + nxos_vtp_version: + version: 2 + provider: "{{ connection }}" + + always: + - name: disable feature vtp + nxos_feature: + feature: vtp + state: disabled + provider: "{{ connection }}" + +- debug: msg="END TRANSPORT:{{ connection.transport }} nxos_vtp_version sanity test" diff --git a/test/integration/targets/nxos_vtp_version/tests/nxapi/sanity.yaml b/test/integration/targets/nxos_vtp_version/tests/nxapi/sanity.yaml deleted file mode 100644 index 475f6eab20..0000000000 --- a/test/integration/targets/nxos_vtp_version/tests/nxapi/sanity.yaml +++ /dev/null @@ -1,23 +0,0 @@ ---- -- debug: msg="START TRANSPORT:NXAPI nxos_vtp_version sanity test" - -- block: - - name: enable feature vtp - nxos_feature: - feature: vtp - state: enabled - provider: "{{ nxapi }}" - - - name: configure vtp version - nxos_vtp_version: - version: 2 - provider: "{{ nxapi }}" - - always: - - name: disable feature vtp - nxos_feature: - feature: vtp - state: disabled - provider: "{{ nxapi }}" - -- debug: msg="END TRANSPORT:NXAPI nxos_vtp_version sanity test" diff --git a/test/integration/targets/nxos_vxlan_vtep/tasks/cli.yaml b/test/integration/targets/nxos_vxlan_vtep/tasks/cli.yaml index d675462dd0..0ab3f8f908 100644 --- a/test/integration/targets/nxos_vxlan_vtep/tasks/cli.yaml +++ b/test/integration/targets/nxos_vxlan_vtep/tasks/cli.yaml @@ -1,15 +1,25 @@ --- -- name: collect all cli test cases +- name: collect common cli test cases + find: + paths: "{{ role_path }}/tests/common" + patterns: "{{ testcase }}.yaml" + register: test_cases + +- name: collect cli test cases find: paths: "{{ role_path }}/tests/cli" patterns: "{{ testcase }}.yaml" - register: test_cases + register: cli_cases + +- set_fact: + test_cases: + files: "{{ test_cases.files }} + {{ cli_cases.files }}" - name: set test_items set_fact: test_items="{{ test_cases.files | map(attribute='path') | list }}" - name: run test case - include: "{{ test_case_to_run }}" + include: "{{ test_case_to_run }} connection={{ cli }}" with_items: "{{ test_items }}" loop_control: loop_var: test_case_to_run diff --git a/test/integration/targets/nxos_vxlan_vtep/tasks/nxapi.yaml b/test/integration/targets/nxos_vxlan_vtep/tasks/nxapi.yaml index ea525379f7..e071f293a2 100644 --- a/test/integration/targets/nxos_vxlan_vtep/tasks/nxapi.yaml +++ b/test/integration/targets/nxos_vxlan_vtep/tasks/nxapi.yaml @@ -1,9 +1,19 @@ --- -- name: collect all nxapi test cases +- name: collect common nxapi test cases + find: + paths: "{{ role_path }}/tests/common" + patterns: "{{ testcase }}.yaml" + register: test_cases + +- name: collect nxapi test cases find: paths: "{{ role_path }}/tests/nxapi" patterns: "{{ testcase }}.yaml" - register: test_cases + register: nxapi_cases + +- set_fact: + test_cases: + files: "{{ test_cases.files }} + {{ nxapi_cases.files }}" - name: set test_items set_fact: test_items="{{ test_cases.files | map(attribute='path') | list }}" @@ -16,7 +26,7 @@ provider: "{{ cli }}" - name: run test case - include: "{{ test_case_to_run }}" + include: "{{ test_case_to_run }} connection={{ nxapi }}" with_items: "{{ test_items }}" loop_control: loop_var: test_case_to_run diff --git a/test/integration/targets/nxos_vxlan_vtep/tests/cli/sanity.yaml b/test/integration/targets/nxos_vxlan_vtep/tests/cli/sanity.yaml deleted file mode 100644 index e15740a608..0000000000 --- a/test/integration/targets/nxos_vxlan_vtep/tests/cli/sanity.yaml +++ /dev/null @@ -1,4 +0,0 @@ ---- -- set_fact: connection="{{ cli }}" - -- import_tasks: targets/nxos_vxlan_vtep/tests/common/sanity.yaml diff --git a/test/integration/targets/nxos_vxlan_vtep/tests/nxapi/sanity.yaml b/test/integration/targets/nxos_vxlan_vtep/tests/nxapi/sanity.yaml deleted file mode 100644 index ad578b6f32..0000000000 --- a/test/integration/targets/nxos_vxlan_vtep/tests/nxapi/sanity.yaml +++ /dev/null @@ -1,4 +0,0 @@ ---- -- set_fact: connection="{{ nxapi }}" - -- import_tasks: targets/nxos_vxlan_vtep/tests/common/sanity.yaml