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:
Nathaniel Case
2017-12-13 14:30:24 -05:00
committed by GitHub
parent cfb15b0272
commit 2425374fdd
37 changed files with 169 additions and 51 deletions

View File

@@ -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

View File

@@ -1,5 +1,5 @@
---
- debug: msg="START vyos_interface cli/basic.yaml"
- debug: msg="START cli/basic.yaml on connection={{ ansible_connection }}"
- name: Run vyos lsmod command
vyos_command:

View File

@@ -1,5 +1,5 @@
---
- debug: msg="START vyos_interface cli/intent.yaml"
- debug: msg="START cli/intent.yaml on connection={{ ansible_connection }}"
- name: Run vyos lsmod command
vyos_command: