summaryrefslogtreecommitdiff
path: root/tests
diff options
context:
space:
mode:
Diffstat (limited to 'tests')
-rw-r--r--tests/integration/targets/vyos_route_maps/tests/cli/deleted.yaml6
-rw-r--r--tests/integration/targets/vyos_route_maps/tests/cli/merged.yaml6
-rw-r--r--tests/integration/targets/vyos_route_maps/vars/main.yaml1
3 files changed, 13 insertions, 0 deletions
diff --git a/tests/integration/targets/vyos_route_maps/tests/cli/deleted.yaml b/tests/integration/targets/vyos_route_maps/tests/cli/deleted.yaml
index c8b9e26c..2999d630 100644
--- a/tests/integration/targets/vyos_route_maps/tests/cli/deleted.yaml
+++ b/tests/integration/targets/vyos_route_maps/tests/cli/deleted.yaml
@@ -21,6 +21,12 @@
- result.changed == true
- result.commands|symmetric_difference(deleted.commands) == []
+ - name: Assert that the after dicts were correctly generated
+ assert:
+ that:
+ - "{{ deleted['after'] | symmetric_difference(result['after']) |length\
+ \ == 0 }}"
+
- name: Delete the existing configuration with the provided running configuration
(IDEMPOTENT)
register: result
diff --git a/tests/integration/targets/vyos_route_maps/tests/cli/merged.yaml b/tests/integration/targets/vyos_route_maps/tests/cli/merged.yaml
index 56812e45..4b5ad4cd 100644
--- a/tests/integration/targets/vyos_route_maps/tests/cli/merged.yaml
+++ b/tests/integration/targets/vyos_route_maps/tests/cli/merged.yaml
@@ -44,6 +44,12 @@
- result.commands|symmetric_difference(merged.commands) == []
- result.after|symmetric_difference(ansible_facts['network_resources']['route_maps']) == []
+ - name: Assert that before dicts were correctly generated
+ assert:
+ that:
+ - "{{ merged['before'] | symmetric_difference(result['before']) |length\
+ \ == 0 }}"
+
- name:
Merge the provided configuration with the existing running configuration
(IDEMPOTENT)
diff --git a/tests/integration/targets/vyos_route_maps/vars/main.yaml b/tests/integration/targets/vyos_route_maps/vars/main.yaml
index 5a0d0278..47658f44 100644
--- a/tests/integration/targets/vyos_route_maps/vars/main.yaml
+++ b/tests/integration/targets/vyos_route_maps/vars/main.yaml
@@ -1,5 +1,6 @@
---
merged:
+ before: []
commands:
- set policy route-map test1 rule 1 description test
- set policy route-map test1 rule 1 action permit