summaryrefslogtreecommitdiffstats
path: root/test/integration/targets/vyos_lldp
diff options
context:
space:
mode:
authorNathaniel Case <this.is@nathanielca.se>2017-12-13 20:30:24 +0100
committerGitHub <noreply@github.com>2017-12-13 20:30:24 +0100
commit2425374fddb5ba5f4f1b5ac8f3ed31ed1144f43b (patch)
tree1b05625a5fda13e4a947f0c6a488119122e6acf7 /test/integration/targets/vyos_lldp
parentRevert "YAML inventory unit test: fix test inventory format (#33828)" (#33869) (diff)
downloadansible-2425374fddb5ba5f4f1b5ac8f3ed31ed1144f43b.tar.xz
ansible-2425374fddb5ba5f4f1b5ac8f3ed31ed1144f43b.zip
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
Diffstat (limited to 'test/integration/targets/vyos_lldp')
-rw-r--r--test/integration/targets/vyos_lldp/tasks/cli.yaml11
-rw-r--r--test/integration/targets/vyos_lldp/tests/cli/basic.yaml2
2 files changed, 11 insertions, 2 deletions
diff --git a/test/integration/targets/vyos_lldp/tasks/cli.yaml b/test/integration/targets/vyos_lldp/tasks/cli.yaml
index d675462dd0..890d3acf3e 100644
--- a/test/integration/targets/vyos_lldp/tasks/cli.yaml
+++ b/test/integration/targets/vyos_lldp/tasks/cli.yaml
@@ -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
diff --git a/test/integration/targets/vyos_lldp/tests/cli/basic.yaml b/test/integration/targets/vyos_lldp/tests/cli/basic.yaml
index ec2dfb42ff..bc7774f0ee 100644
--- a/test/integration/targets/vyos_lldp/tests/cli/basic.yaml
+++ b/test/integration/targets/vyos_lldp/tests/cli/basic.yaml
@@ -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