mirror of
https://github.com/ansible-collections/community.general.git
synced 2026-05-08 06:12:51 +00:00
Actually move vyos tests to network_cli (#33710)
* Fix vyos on network_cli on python3 bytes do not have format() in Python3 * Push connection to tasks, with bonus connection=local test * Run tests without explicit connection set * Add/update START messages where appropriate
This commit is contained in:
@@ -4,12 +4,19 @@
|
||||
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: run test case
|
||||
include: "{{ test_case_to_run }}"
|
||||
- name: run test case (connection=network_cli)
|
||||
include: "{{ test_case_to_run }} ansible_connection=network_cli"
|
||||
with_items: "{{ test_items }}"
|
||||
loop_control:
|
||||
loop_var: test_case_to_run
|
||||
|
||||
- name: run test case (connection=local)
|
||||
include: "{{ test_case_to_run }} ansible_connection=local"
|
||||
with_first_found: "{{ test_items }}"
|
||||
loop_control:
|
||||
loop_var: test_case_to_run
|
||||
|
||||
@@ -1,4 +1,6 @@
|
||||
---
|
||||
- debug: msg="START cli/basic.yaml on connection={{ ansible_connection }}"
|
||||
|
||||
- name: Remove IP address
|
||||
vyos_l3_interface:
|
||||
name: eth1
|
||||
|
||||
Reference in New Issue
Block a user