summaryrefslogtreecommitdiff
path: root/tests/integration/targets/vyos_interfaces
diff options
context:
space:
mode:
authorCaptTrews <capttrews@gmail.com>2019-12-04 00:26:13 +0000
committerCaptTrews <capttrews@gmail.com>2019-12-04 00:26:13 +0000
commitf4fff0b4a4ecd2e634f4dcb515bf92c20d3771ba (patch)
tree133958d96ff13a3df7bae53742d138ac9bfd2884 /tests/integration/targets/vyos_interfaces
parentdf640eaacf60e82e6cf6f8b10236894eef1cc8ce (diff)
downloadvyos-ansible-collection-f4fff0b4a4ecd2e634f4dcb515bf92c20d3771ba.tar.gz
vyos-ansible-collection-f4fff0b4a4ecd2e634f4dcb515bf92c20d3771ba.zip
Updated from network content collector
Signed-off-by: CaptTrews <capttrews@gmail.com>
Diffstat (limited to 'tests/integration/targets/vyos_interfaces')
-rw-r--r--tests/integration/targets/vyos_interfaces/meta/main.yaml3
-rw-r--r--tests/integration/targets/vyos_interfaces/tasks/main.yaml2
-rw-r--r--tests/integration/targets/vyos_interfaces/tests/cli/_populate.yaml2
-rw-r--r--tests/integration/targets/vyos_interfaces/tests/cli/_remove_config.yaml2
-rw-r--r--tests/integration/targets/vyos_interfaces/tests/cli/deleted.yaml2
-rw-r--r--tests/integration/targets/vyos_interfaces/tests/cli/empty_config.yaml8
-rw-r--r--tests/integration/targets/vyos_interfaces/tests/cli/merged.yaml4
-rw-r--r--tests/integration/targets/vyos_interfaces/tests/cli/overridden.yaml6
-rw-r--r--tests/integration/targets/vyos_interfaces/tests/cli/replaced.yaml20
-rw-r--r--tests/integration/targets/vyos_interfaces/tests/cli/rtt.yaml2
10 files changed, 26 insertions, 25 deletions
diff --git a/tests/integration/targets/vyos_interfaces/meta/main.yaml b/tests/integration/targets/vyos_interfaces/meta/main.yaml
index e380a13..7413320 100644
--- a/tests/integration/targets/vyos_interfaces/meta/main.yaml
+++ b/tests/integration/targets/vyos_interfaces/meta/main.yaml
@@ -1,2 +1,3 @@
+---
dependencies:
- - prepare_vyos_tests \ No newline at end of file
+ - prepare_vyos_tests
diff --git a/tests/integration/targets/vyos_interfaces/tasks/main.yaml b/tests/integration/targets/vyos_interfaces/tasks/main.yaml
index 415c99d..d4cf26f 100644
--- a/tests/integration/targets/vyos_interfaces/tasks/main.yaml
+++ b/tests/integration/targets/vyos_interfaces/tasks/main.yaml
@@ -1,2 +1,2 @@
---
-- { include: cli.yaml, tags: ['cli'] }
+- {include: cli.yaml, tags: ['cli']}
diff --git a/tests/integration/targets/vyos_interfaces/tests/cli/_populate.yaml b/tests/integration/targets/vyos_interfaces/tests/cli/_populate.yaml
index 0a44fa4..4dd5f18 100644
--- a/tests/integration/targets/vyos_interfaces/tests/cli/_populate.yaml
+++ b/tests/integration/targets/vyos_interfaces/tests/cli/_populate.yaml
@@ -14,4 +14,4 @@
- eth1
- eth2
loop_control:
- loop_var: intf \ No newline at end of file
+ loop_var: intf
diff --git a/tests/integration/targets/vyos_interfaces/tests/cli/_remove_config.yaml b/tests/integration/targets/vyos_interfaces/tests/cli/_remove_config.yaml
index ce4723d..9157f55 100644
--- a/tests/integration/targets/vyos_interfaces/tests/cli/_remove_config.yaml
+++ b/tests/integration/targets/vyos_interfaces/tests/cli/_remove_config.yaml
@@ -14,4 +14,4 @@
- eth1
- eth2
loop_control:
- loop_var: intf \ No newline at end of file
+ loop_var: intf
diff --git a/tests/integration/targets/vyos_interfaces/tests/cli/deleted.yaml b/tests/integration/targets/vyos_interfaces/tests/cli/deleted.yaml
index b48f916..fc86ca7 100644
--- a/tests/integration/targets/vyos_interfaces/tests/cli/deleted.yaml
+++ b/tests/integration/targets/vyos_interfaces/tests/cli/deleted.yaml
@@ -4,7 +4,7 @@
- include_tasks: _populate.yaml
-- block:
+- block:
- name: Delete attributes of given interfaces
vyos.vyos.vyos_interfaces: &deleted
config:
diff --git a/tests/integration/targets/vyos_interfaces/tests/cli/empty_config.yaml b/tests/integration/targets/vyos_interfaces/tests/cli/empty_config.yaml
index ab68fde..4a72c8a 100644
--- a/tests/integration/targets/vyos_interfaces/tests/cli/empty_config.yaml
+++ b/tests/integration/targets/vyos_interfaces/tests/cli/empty_config.yaml
@@ -1,13 +1,13 @@
---
- debug:
- msg: "START vyos_interfaces empty_config integration tests on connection={{ ansible_connection }}"
+ msg: "START vyos_interfaces empty_config integration tests on connection={{ ansible_connection }}"
- name: Merged with empty config should give appropriate error message
vyos.vyos.vyos_interfaces:
config:
state: merged
register: result
- ignore_errors: True
+ ignore_errors: true
- assert:
that:
@@ -18,7 +18,7 @@
config:
state: replaced
register: result
- ignore_errors: True
+ ignore_errors: true
- assert:
that:
@@ -29,7 +29,7 @@
config:
state: overridden
register: result
- ignore_errors: True
+ ignore_errors: true
- assert:
that:
diff --git a/tests/integration/targets/vyos_interfaces/tests/cli/merged.yaml b/tests/integration/targets/vyos_interfaces/tests/cli/merged.yaml
index 89ed893..50e4936 100644
--- a/tests/integration/targets/vyos_interfaces/tests/cli/merged.yaml
+++ b/tests/integration/targets/vyos_interfaces/tests/cli/merged.yaml
@@ -1,6 +1,6 @@
---
- 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
@@ -56,4 +56,4 @@
that:
- "{{ merged['after'] | symmetric_difference(result['before']) |length == 0 }}"
always:
- - include_tasks: _remove_config.yaml
+ - include_tasks: _remove_config.yaml
diff --git a/tests/integration/targets/vyos_interfaces/tests/cli/overridden.yaml b/tests/integration/targets/vyos_interfaces/tests/cli/overridden.yaml
index c9eb1b7..74669f7 100644
--- a/tests/integration/targets/vyos_interfaces/tests/cli/overridden.yaml
+++ b/tests/integration/targets/vyos_interfaces/tests/cli/overridden.yaml
@@ -1,6 +1,6 @@
---
- debug:
- msg: "START vyos_interfaces overridden integration tests on connection={{ ansible_connection }}"
+ msg: "START vyos_interfaces overridden integration tests on connection={{ ansible_connection }}"
- include_tasks: _remove_config.yaml
@@ -22,7 +22,7 @@
- name: Assert that before dicts were correctly generated
assert:
that:
- - "{{ populate | symmetric_difference(result['before']) |length == 0 }}"
+ - "{{ populate | symmetric_difference(result['before']) |length == 0 }}"
- name: Assert that correct commands were generated
assert:
@@ -47,6 +47,6 @@
assert:
that:
- "{{ overridden['after'] | symmetric_difference(result['before']) |length == 0 }}"
-
+
always:
- include_tasks: _remove_config.yaml
diff --git a/tests/integration/targets/vyos_interfaces/tests/cli/replaced.yaml b/tests/integration/targets/vyos_interfaces/tests/cli/replaced.yaml
index 1211f63..64510d7 100644
--- a/tests/integration/targets/vyos_interfaces/tests/cli/replaced.yaml
+++ b/tests/integration/targets/vyos_interfaces/tests/cli/replaced.yaml
@@ -1,6 +1,6 @@
---
- debug:
- msg: "START vyos_interfaces replaced integration tests on connection={{ ansible_connection }}"
+ msg: "START vyos_interfaces replaced integration tests on connection={{ ansible_connection }}"
- include_tasks: _remove_config.yaml
@@ -13,8 +13,8 @@
- name: eth1
description: "Replaced by Ansible"
vifs:
- - vlan_id: 100
- description: "VIF 100 - Replaced by Ansible"
+ - vlan_id: 100
+ description: "VIF 100 - Replaced by Ansible"
- name: eth2
mtu: 1400
@@ -24,8 +24,8 @@
- name: Assert that correct set of commands were generated
assert:
- that:
- - "{{ replaced['commands'] | symmetric_difference(result['commands']) |length == 0 }}"
+ that:
+ - "{{ replaced['commands'] | symmetric_difference(result['commands']) |length == 0 }}"
- name: Assert that before dicts are correctly generated
assert:
@@ -43,13 +43,13 @@
- name: Assert that task was idempotent
assert:
- that:
- - "result['changed'] == false"
+ that:
+ - "result['changed'] == false"
- name: Assert that before dict is correctly generated
assert:
- that:
- - "{{ replaced['after'] | symmetric_difference(result['before']) |length == 0 }}"
+ that:
+ - "{{ replaced['after'] | symmetric_difference(result['before']) |length == 0 }}"
always:
- - include_tasks: _remove_config.yaml \ No newline at end of file
+ - include_tasks: _remove_config.yaml
diff --git a/tests/integration/targets/vyos_interfaces/tests/cli/rtt.yaml b/tests/integration/targets/vyos_interfaces/tests/cli/rtt.yaml
index 3ec4d3d..f947513 100644
--- a/tests/integration/targets/vyos_interfaces/tests/cli/rtt.yaml
+++ b/tests/integration/targets/vyos_interfaces/tests/cli/rtt.yaml
@@ -73,6 +73,6 @@
- name: Assert that config was reverted
assert:
that: "{{ base_config['after'] | symmetric_difference(revert['after']) |length == 0 }}"
-
+
always:
- include_tasks: _remove_config.yaml