mirror of
https://github.com/ansible-collections/community.general.git
synced 2025-07-22 12:50:22 -07: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:
parent
cfb15b0272
commit
2425374fdd
37 changed files with 169 additions and 51 deletions
|
@ -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: Make sure LLDP is not running before tests
|
||||
vyos_config:
|
||||
lines: delete service lldp
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue