summaryrefslogtreecommitdiff
path: root/tests/integration/targets/vyos_l3_interfaces
diff options
context:
space:
mode:
authorKate Case <kcase@redhat.com>2023-03-28 09:32:38 -0400
committerGitHub <noreply@github.com>2023-03-28 09:32:38 -0400
commit2653fa8d08af498677604927399451415b25884e (patch)
tree51695189c6cebf3308a3d063b6df42c41fed2832 /tests/integration/targets/vyos_l3_interfaces
parentd181df0cc702cbafb8a9cd640b2eeb6cc3b9a962 (diff)
downloadvyos.vyos-2653fa8d08af498677604927399451415b25884e.tar.gz
vyos.vyos-2653fa8d08af498677604927399451415b25884e.zip
Always clear config before setting base config in tests. (#306)
* Always clear config before setting base config in tests. * Clear bond before removing
Diffstat (limited to 'tests/integration/targets/vyos_l3_interfaces')
-rw-r--r--tests/integration/targets/vyos_l3_interfaces/tests/cli/_populate.yaml2
-rw-r--r--tests/integration/targets/vyos_l3_interfaces/tests/cli/deleted.yaml6
-rw-r--r--tests/integration/targets/vyos_l3_interfaces/tests/cli/gathered.yaml2
-rw-r--r--tests/integration/targets/vyos_l3_interfaces/tests/cli/overridden.yaml4
-rw-r--r--tests/integration/targets/vyos_l3_interfaces/tests/cli/rendered.yaml2
-rw-r--r--tests/integration/targets/vyos_l3_interfaces/tests/cli/replaced.yaml4
-rw-r--r--tests/integration/targets/vyos_l3_interfaces/tests/redirection/cli/shortname.yaml2
7 files changed, 6 insertions, 16 deletions
diff --git a/tests/integration/targets/vyos_l3_interfaces/tests/cli/_populate.yaml b/tests/integration/targets/vyos_l3_interfaces/tests/cli/_populate.yaml
index d5d8620..2a766d5 100644
--- a/tests/integration/targets/vyos_l3_interfaces/tests/cli/_populate.yaml
+++ b/tests/integration/targets/vyos_l3_interfaces/tests/cli/_populate.yaml
@@ -1,4 +1,6 @@
---
+- ansible.builtin.include_tasks: _remove_config.yaml
+
- name: Setup
vars:
lines:
diff --git a/tests/integration/targets/vyos_l3_interfaces/tests/cli/deleted.yaml b/tests/integration/targets/vyos_l3_interfaces/tests/cli/deleted.yaml
index 25ce28e..9242fb5 100644
--- a/tests/integration/targets/vyos_l3_interfaces/tests/cli/deleted.yaml
+++ b/tests/integration/targets/vyos_l3_interfaces/tests/cli/deleted.yaml
@@ -1,14 +1,12 @@
---
- debug:
msg:
- Start vyos_interfaces deleted integration tests ansible_connection={{ ansible_connection
+ START vyos_interfaces deleted integration tests ansible_connection={{ ansible_connection
}}
-- include_tasks: _remove_config.yaml
+- include_tasks: _populate.yaml
- block:
- - include_tasks: _populate.yaml
-
- name: Delete attributes of given interfaces
register: result
vyos.vyos.vyos_l3_interfaces: &id001
diff --git a/tests/integration/targets/vyos_l3_interfaces/tests/cli/gathered.yaml b/tests/integration/targets/vyos_l3_interfaces/tests/cli/gathered.yaml
index ce8faba..f18f7d3 100644
--- a/tests/integration/targets/vyos_l3_interfaces/tests/cli/gathered.yaml
+++ b/tests/integration/targets/vyos_l3_interfaces/tests/cli/gathered.yaml
@@ -4,8 +4,6 @@
START vyos_l3_interfaces gathered integration tests on connection={{ ansible_connection
}}
-- include_tasks: _remove_config.yaml
-
- include_tasks: _populate.yaml
- block:
diff --git a/tests/integration/targets/vyos_l3_interfaces/tests/cli/overridden.yaml b/tests/integration/targets/vyos_l3_interfaces/tests/cli/overridden.yaml
index dc6f0ce..c12e2ae 100644
--- a/tests/integration/targets/vyos_l3_interfaces/tests/cli/overridden.yaml
+++ b/tests/integration/targets/vyos_l3_interfaces/tests/cli/overridden.yaml
@@ -4,11 +4,9 @@
START vyos_l3_interfaces merged integration tests on connection={{ ansible_connection
}}
-- include_tasks: _remove_config.yaml
+- include_tasks: _populate.yaml
- block:
- - include_tasks: _populate.yaml
-
- name: Overrides all device configuration with provided configuration
register: result
vyos.vyos.vyos_l3_interfaces: &id001
diff --git a/tests/integration/targets/vyos_l3_interfaces/tests/cli/rendered.yaml b/tests/integration/targets/vyos_l3_interfaces/tests/cli/rendered.yaml
index 7bbf53c..2a606c3 100644
--- a/tests/integration/targets/vyos_l3_interfaces/tests/cli/rendered.yaml
+++ b/tests/integration/targets/vyos_l3_interfaces/tests/cli/rendered.yaml
@@ -4,8 +4,6 @@
START vyos_l3_interfaces rendered integration tests on connection={{ ansible_connection
}}
-- include_tasks: _remove_config.yaml
-
- include_tasks: _populate.yaml
- block:
diff --git a/tests/integration/targets/vyos_l3_interfaces/tests/cli/replaced.yaml b/tests/integration/targets/vyos_l3_interfaces/tests/cli/replaced.yaml
index c102602..26fe4f8 100644
--- a/tests/integration/targets/vyos_l3_interfaces/tests/cli/replaced.yaml
+++ b/tests/integration/targets/vyos_l3_interfaces/tests/cli/replaced.yaml
@@ -4,11 +4,9 @@
START vyos_l3_interfaces replaced integration tests on connection={{ ansible_connection
}}
-- include_tasks: _remove_config.yaml
+- include_tasks: _populate.yaml
- block:
- - include_tasks: _populate.yaml
-
- name: Replace device configurations of listed interfaces with provided configurations
register: result
vyos.vyos.vyos_l3_interfaces: &id001
diff --git a/tests/integration/targets/vyos_l3_interfaces/tests/redirection/cli/shortname.yaml b/tests/integration/targets/vyos_l3_interfaces/tests/redirection/cli/shortname.yaml
index bee2a09..963ab55 100644
--- a/tests/integration/targets/vyos_l3_interfaces/tests/redirection/cli/shortname.yaml
+++ b/tests/integration/targets/vyos_l3_interfaces/tests/redirection/cli/shortname.yaml
@@ -2,8 +2,6 @@
- debug:
msg: START l3_interfaces rendered on connection={{ ansible_connection }}
-- include_tasks: _remove_config.yaml
-
- include_tasks: _populate.yaml
- block: