summaryrefslogtreecommitdiff
path: root/tests/integration/targets/vyos_interfaces
diff options
context:
space:
mode:
Diffstat (limited to 'tests/integration/targets/vyos_interfaces')
-rw-r--r--tests/integration/targets/vyos_interfaces/tests/cli/gathered.yaml7
-rw-r--r--tests/integration/targets/vyos_interfaces/tests/cli/merged.yaml15
-rw-r--r--tests/integration/targets/vyos_interfaces/tests/redirection/cli/shortname.yaml10
3 files changed, 15 insertions, 17 deletions
diff --git a/tests/integration/targets/vyos_interfaces/tests/cli/gathered.yaml b/tests/integration/targets/vyos_interfaces/tests/cli/gathered.yaml
index ac9892c..85bf4d3 100644
--- a/tests/integration/targets/vyos_interfaces/tests/cli/gathered.yaml
+++ b/tests/integration/targets/vyos_interfaces/tests/cli/gathered.yaml
@@ -1,6 +1,7 @@
---
- debug:
- msg: START vyos_interfaces gathered integration tests on connection={{ ansible_connection
+ msg:
+ START vyos_interfaces gathered integration tests on connection={{ ansible_connection
}}
- include_tasks: _remove_config.yaml
@@ -8,8 +9,7 @@
- include_tasks: _populate.yaml
- block:
-
- - name: Gather the provided configuration with the exisiting running configuration
+ - name: Gather the provided configuration with the existing running configuration
register: result
vyos.vyos.vyos_interfaces:
config:
@@ -22,5 +22,4 @@
\ }}"
always:
-
- include_tasks: _remove_config.yaml
diff --git a/tests/integration/targets/vyos_interfaces/tests/cli/merged.yaml b/tests/integration/targets/vyos_interfaces/tests/cli/merged.yaml
index e0fa0b9..39f4938 100644
--- a/tests/integration/targets/vyos_interfaces/tests/cli/merged.yaml
+++ b/tests/integration/targets/vyos_interfaces/tests/cli/merged.yaml
@@ -1,24 +1,22 @@
---
- debug:
- msg: START vyos_interfaces merged integration tests on connection={{ ansible_connection
+ msg:
+ START vyos_interfaces 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_interfaces: &id001
config:
-
- name: eth1
description: Configured by Ansible - Interface 1
mtu: 1500
speed: auto
duplex: auto
vifs:
-
- vlan_id: 100
description: Eth1 - VIF 100
mtu: 400
@@ -34,7 +32,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
@@ -49,7 +48,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_interfaces: *id001
@@ -65,5 +65,4 @@
- "{{ merged['after'] | symmetric_difference(result['before']) |length\
\ == 0 }}"
always:
-
- include_tasks: _remove_config.yaml
diff --git a/tests/integration/targets/vyos_interfaces/tests/redirection/cli/shortname.yaml b/tests/integration/targets/vyos_interfaces/tests/redirection/cli/shortname.yaml
index d2e501a..810601a 100644
--- a/tests/integration/targets/vyos_interfaces/tests/redirection/cli/shortname.yaml
+++ b/tests/integration/targets/vyos_interfaces/tests/redirection/cli/shortname.yaml
@@ -6,18 +6,16 @@
- 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.interfaces: &id001
config:
-
- name: eth1
description: Configured by Ansible - Interface 1
mtu: 1500
speed: auto
duplex: auto
vifs:
-
- vlan_id: 100
description: Eth1 - VIF 100
mtu: 400
@@ -33,7 +31,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
@@ -48,7 +47,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.interfaces: *id001