summaryrefslogtreecommitdiff
path: root/tests/integration/targets/vyos_static_routes
diff options
context:
space:
mode:
Diffstat (limited to 'tests/integration/targets/vyos_static_routes')
-rw-r--r--tests/integration/targets/vyos_static_routes/tests/cli/gathered.yaml7
-rw-r--r--tests/integration/targets/vyos_static_routes/tests/cli/merged.yaml20
-rw-r--r--tests/integration/targets/vyos_static_routes/tests/redirection/cli/shortname.yaml18
3 files changed, 17 insertions, 28 deletions
diff --git a/tests/integration/targets/vyos_static_routes/tests/cli/gathered.yaml b/tests/integration/targets/vyos_static_routes/tests/cli/gathered.yaml
index d3b84d1..8435d04 100644
--- a/tests/integration/targets/vyos_static_routes/tests/cli/gathered.yaml
+++ b/tests/integration/targets/vyos_static_routes/tests/cli/gathered.yaml
@@ -1,6 +1,7 @@
---
- debug:
- msg: START vyos_static_routes gathered integration tests on connection={{ ansible_connection
+ msg:
+ START vyos_static_routes gathered integration tests on connection={{ ansible_connection
}}
- include_tasks: _remove_config.yaml
@@ -8,8 +9,7 @@
- include_tasks: _populate.yaml
- block:
-
- - name: Merge the provided configuration with the exisiting running configuration
+ - name: Merge the provided configuration with the existing running configuration
register: result
vyos.vyos.vyos_static_routes: &id001
config:
@@ -30,5 +30,4 @@
that:
- result['changed'] == false
always:
-
- include_tasks: _remove_config.yaml
diff --git a/tests/integration/targets/vyos_static_routes/tests/cli/merged.yaml b/tests/integration/targets/vyos_static_routes/tests/cli/merged.yaml
index 999ae86..19e71fa 100644
--- a/tests/integration/targets/vyos_static_routes/tests/cli/merged.yaml
+++ b/tests/integration/targets/vyos_static_routes/tests/cli/merged.yaml
@@ -1,41 +1,34 @@
---
- debug:
- msg: START vyos_static_routes merged integration tests on connection={{ ansible_connection
+ msg:
+ START vyos_static_routes merged integration tests on connection={{ ansible_connection
}}
- include_tasks: _remove_config.yaml
- block:
-
- - name: Merge the provided configuration with the exisiting running configuration
+ - name: Merge the provided configuration with the existing running configuration
register: result
vyos.vyos.vyos_static_routes: &id001
config:
-
- address_families:
-
- afi: ipv4
routes:
-
- dest: 192.0.2.32/28
blackhole_config:
type: blackhole
next_hops:
-
- forward_router_address: 192.0.2.10
- forward_router_address: 192.0.2.9
- address_families:
-
- afi: ipv6
routes:
-
- dest: 2001:db8:1000::/36
blackhole_config:
distance: 2
next_hops:
-
- forward_router_address: 2001:db8:2000:2::1
- forward_router_address: 2001:db8:2000:2::2
@@ -43,7 +36,8 @@
- name: Assert that before dicts were correctly generated
assert:
- that: "{{ merged['before'] | symmetric_difference(result['before']) |length\
+ that:
+ "{{ merged['before'] | symmetric_difference(result['before']) |length\
\ == 0 }}"
- name: Assert that correct set of commands were generated
@@ -58,7 +52,8 @@
- "{{ merged['after'] | symmetric_difference(result['after']) |length\
\ == 0 }}"
- - name: Merge the provided configuration with the existing running configuration
+ - name:
+ Merge the provided configuration with the existing running configuration
(IDEMPOTENT)
register: result
vyos.vyos.vyos_static_routes: *id001
@@ -74,5 +69,4 @@
- "{{ merged['after'] | symmetric_difference(result['before']) |length\
\ == 0 }}"
always:
-
- include_tasks: _remove_config.yaml
diff --git a/tests/integration/targets/vyos_static_routes/tests/redirection/cli/shortname.yaml b/tests/integration/targets/vyos_static_routes/tests/redirection/cli/shortname.yaml
index 08c22b9..364866e 100644
--- a/tests/integration/targets/vyos_static_routes/tests/redirection/cli/shortname.yaml
+++ b/tests/integration/targets/vyos_static_routes/tests/redirection/cli/shortname.yaml
@@ -1,40 +1,34 @@
---
- debug:
- msg: START shortname merged integration tests on connection={{ ansible_connection
+ msg:
+ START shortname merged integration tests on connection={{ ansible_connection
}}
- include_tasks: _remove_config.yaml
- block:
- - name: Merge the provided configuration with the exisiting running configuration
+ - name: Merge the provided configuration with the existing running configuration
register: result
vyos.vyos.static_routes: &id001
config:
-
- address_families:
-
- afi: ipv4
routes:
-
- dest: 192.0.2.32/28
blackhole_config:
type: blackhole
next_hops:
-
- forward_router_address: 192.0.2.10
- forward_router_address: 192.0.2.9
- address_families:
-
- afi: ipv6
routes:
-
- dest: 2001:db8:1000::/36
blackhole_config:
distance: 2
next_hops:
-
- forward_router_address: 2001:db8:2000:2::1
- forward_router_address: 2001:db8:2000:2::2
@@ -42,7 +36,8 @@
- name: Assert that before dicts were correctly generated
assert:
- that: "{{ merged['before'] | symmetric_difference(result['before']) |length\
+ that:
+ "{{ merged['before'] | symmetric_difference(result['before']) |length\
\ == 0 }}"
- name: Assert that correct set of commands were generated
@@ -57,7 +52,8 @@
- "{{ merged['after'] | symmetric_difference(result['after']) |length\
\ == 0 }}"
- - name: Merge the provided configuration with the existing running configuration
+ - name:
+ Merge the provided configuration with the existing running configuration
(IDEMPOTENT)
register: result
vyos.vyos.static_routes: *id001