diff options
Diffstat (limited to 'tests/integration/targets/vyos_command/tasks')
3 files changed, 18 insertions, 14 deletions
diff --git a/tests/integration/targets/vyos_command/tasks/cli.yaml b/tests/integration/targets/vyos_command/tasks/cli.yaml index b2746ce7..d06a6476 100644 --- a/tests/integration/targets/vyos_command/tasks/cli.yaml +++ b/tests/integration/targets/vyos_command/tasks/cli.yaml @@ -1,16 +1,17 @@ --- -- name: collect all cli test cases - find: +- 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 - set_fact: test_items="{{ test_cases.files | map(attribute='path') | list }}" +- name: Set test_items + ansible.builtin.set_fact: + test_items: "{{ test_cases.files | map(attribute='path') | list }}" -- name: run test case (connection=ansible.netcommon.network_cli) - include: "{{ test_case_to_run }} ansible_connection=ansible.netcommon.network_cli" +- name: Run test case (connection=ansible.netcommon.network_cli) + ansible.builtin.include_tasks: "{{ test_case_to_run }} ansible_connection=ansible.netcommon.network_cli" with_items: "{{ test_items }}" loop_control: loop_var: test_case_to_run diff --git a/tests/integration/targets/vyos_command/tasks/main.yaml b/tests/integration/targets/vyos_command/tasks/main.yaml index 676b8ec5..34f7038e 100644 --- a/tests/integration/targets/vyos_command/tasks/main.yaml +++ b/tests/integration/targets/vyos_command/tasks/main.yaml @@ -1,7 +1,9 @@ --- -- include: cli.yaml +- name: Run CLI tests + ansible.builtin.include_tasks: cli.yaml -- include: redirection.yaml +- name: Run redirection CLI tests + ansible.builtin.include_tasks: redirection.yaml when: ansible_version.full is version('2.10.0', '>=') tags: - network_cli diff --git a/tests/integration/targets/vyos_command/tasks/redirection.yaml b/tests/integration/targets/vyos_command/tasks/redirection.yaml index 48ad53ae..a368b764 100644 --- a/tests/integration/targets/vyos_command/tasks/redirection.yaml +++ b/tests/integration/targets/vyos_command/tasks/redirection.yaml @@ -1,16 +1,17 @@ --- -- name: collect all redirection cli test cases - find: +- name: Collect all redirection cli test cases + ansible.builtin.find: paths: "{{ role_path }}/tests/redirection/cli" patterns: "{{ testcase }}.yaml" register: shortname_test_cases delegate_to: localhost -- name: set test_items for redirection - set_fact: test_items="{{ shortname_test_cases.files | map(attribute='path') | list }}" +- name: Set test_items for redirection + ansible.builtin.set_fact: + test_items: "{{ shortname_test_cases.files | map(attribute='path') | list }}" -- name: run test case (connection=ansible.netcommon.network_cli) - include: "{{ test_case_to_run }} ansible_connection=ansible.netcommon.network_cli" +- name: Run test case (connection=ansible.netcommon.network_cli) + ansible.builtin.include_tasks: "{{ test_case_to_run }} ansible_connection=ansible.netcommon.network_cli" with_items: "{{ test_items }}" loop_control: loop_var: test_case_to_run |
