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
commit 2425374fdd
No known key found for this signature in database
GPG key ID: 4AEE18F83AFDEB23
37 changed files with 169 additions and 51 deletions

View file

@ -1,5 +1,5 @@
---
- debug: msg="START cli/bad_operator.yaml"
- debug: msg="START cli/bad_operator.yaml on connection={{ ansible_connection }}"
- name: test bad operator
vyos_command:
@ -16,4 +16,4 @@
- result.failed == true
- result.msg is defined
- debug: msg="END cli/bad_operator.yaml"
- debug: msg="END cli/bad_operator.yaml on connection={{ ansible_connection }}"

View file

@ -1,5 +1,5 @@
---
- debug: msg="START cli/contains.yaml"
- debug: msg="START cli/contains.yaml on connection={{ ansible_connection }}"
- name: test contains operator
vyos_command:
@ -17,4 +17,4 @@
- result.stdout is defined
- result.stdout_lines is defined
- debug: msg="END cli/contains.yaml"
- debug: msg="END cli/contains.yaml on connection={{ ansible_connection }}"

View file

@ -1,5 +1,5 @@
---
- debug: msg="START cli/invalid.yaml"
- debug: msg="START cli/invalid.yaml on connection={{ ansible_connection }}"
- name: run invalid command
vyos_command:
@ -19,4 +19,4 @@
- assert: { that: result.failed }
- debug: msg="END cli/invalid.yaml"
- debug: msg="END cli/invalid.yaml on connection={{ ansible_connection }}"

View file

@ -1,5 +1,5 @@
---
- debug: msg="START cli/output.yaml"
- debug: msg="START cli/output.yaml on connection={{ ansible_connection }}"
- name: get output for single command
vyos_command:
@ -41,4 +41,4 @@
- result.stdout_lines is defined
- result.stdout_lines[2] | length >= 20
- debug: msg="END cli/output.yaml"
- debug: msg="END cli/output.yaml on connection={{ ansible_connection }}"

View file

@ -1,5 +1,5 @@
---
- debug: msg="START cli/timeout.yaml"
- debug: msg="START cli/timeout.yaml on connection={{ ansible_connection }}"
- name: test bad condition
vyos_command:
@ -15,4 +15,4 @@
- result.failed == true
- result.msg is defined
- debug: msg="END cli/timeout.yaml"
- debug: msg="END cli/timeout.yaml on connection={{ ansible_connection }}"