summaryrefslogtreecommitdiff
path: root/tests/integration/targets/vyos_ospfv3
diff options
context:
space:
mode:
authorKate Case <kcase@redhat.com>2023-05-03 21:46:19 -0400
committerGitHub <noreply@github.com>2023-05-03 21:46:19 -0400
commit65eaf174d90485c566d71ec9b49365cb5bc494ba (patch)
tree067211467cf9fcb8ccd90541af005214c9f1f398 /tests/integration/targets/vyos_ospfv3
parent65026b8bc3040315e87464eeecf81c1989c9cee5 (diff)
downloadvyos.vyos-65eaf174d90485c566d71ec9b49365cb5bc494ba.tar.gz
vyos.vyos-65eaf174d90485c566d71ec9b49365cb5bc494ba.zip
Add ansible-lint (#322)
* Add ansible-lint * Fix some tasks * Ignore ignore_errors * Stop prettier and yamllint from fighting
Diffstat (limited to 'tests/integration/targets/vyos_ospfv3')
-rw-r--r--tests/integration/targets/vyos_ospfv3/tasks/cli.yaml7
-rw-r--r--tests/integration/targets/vyos_ospfv3/tasks/main.yaml6
-rw-r--r--tests/integration/targets/vyos_ospfv3/tasks/redirection.yaml13
3 files changed, 15 insertions, 11 deletions
diff --git a/tests/integration/targets/vyos_ospfv3/tasks/cli.yaml b/tests/integration/targets/vyos_ospfv3/tasks/cli.yaml
index 83496e0..daccf72 100644
--- a/tests/integration/targets/vyos_ospfv3/tasks/cli.yaml
+++ b/tests/integration/targets/vyos_ospfv3/tasks/cli.yaml
@@ -1,6 +1,6 @@
---
- name: Collect all cli test cases
- find:
+ ansible.builtin.find:
paths: "{{ role_path }}/tests/cli"
patterns: "{{ testcase }}.yaml"
use_regex: true
@@ -8,10 +8,11 @@
delegate_to: localhost
- name: Set test_items
- set_fact: test_items="{{ test_cases.files | map(attribute='path') | list }}"
+ ansible.builtin.set_fact:
+ test_items: "{{ test_cases.files | map(attribute='path') | list }}"
- name: Run test case (connection=ansible.netcommon.network_cli)
- include: "{{ test_case_to_run }}"
+ ansible.builtin.include_tasks: "{{ test_case_to_run }}"
vars:
ansible_connection: ansible.netcommon.network_cli
with_items: "{{ test_items }}"
diff --git a/tests/integration/targets/vyos_ospfv3/tasks/main.yaml b/tests/integration/targets/vyos_ospfv3/tasks/main.yaml
index 6b7d046..9a3359e 100644
--- a/tests/integration/targets/vyos_ospfv3/tasks/main.yaml
+++ b/tests/integration/targets/vyos_ospfv3/tasks/main.yaml
@@ -1,9 +1,11 @@
---
-- include: cli.yaml
+- name: Run CLI tests
+ ansible.builtin.include_tasks: cli.yaml
tags:
- network_cli
-- include: redirection.yaml
+- name: Run redirection CLI tests
+ ansible.builtin.include_tasks: redirection.yaml
when: ansible_version.full is version('2.10.0', '>=')
tags:
- network_cli
diff --git a/tests/integration/targets/vyos_ospfv3/tasks/redirection.yaml b/tests/integration/targets/vyos_ospfv3/tasks/redirection.yaml
index 48ad53a..a368b76 100644
--- a/tests/integration/targets/vyos_ospfv3/tasks/redirection.yaml
+++ b/tests/integration/targets/vyos_ospfv3/tasks/redirection.yaml
@@ -1,16 +1,17 @@
---
-- name: collect all redirection cli test cases
- find:
+- name: Collect all redirection cli test cases
+ ansible.builtin.find:
paths: "{{ role_path }}/tests/redirection/cli"
patterns: "{{ testcase }}.yaml"
register: shortname_test_cases
delegate_to: localhost
-- name: set test_items for redirection
- set_fact: test_items="{{ shortname_test_cases.files | map(attribute='path') | list }}"
+- name: Set test_items for redirection
+ ansible.builtin.set_fact:
+ test_items: "{{ shortname_test_cases.files | map(attribute='path') | list }}"
-- name: run test case (connection=ansible.netcommon.network_cli)
- include: "{{ test_case_to_run }} ansible_connection=ansible.netcommon.network_cli"
+- name: Run test case (connection=ansible.netcommon.network_cli)
+ ansible.builtin.include_tasks: "{{ test_case_to_run }} ansible_connection=ansible.netcommon.network_cli"
with_items: "{{ test_items }}"
loop_control:
loop_var: test_case_to_run