summaryrefslogtreecommitdiff
path: root/test/integration/targets/eos_vlans/tests/cli/idempotent.yaml
diff options
context:
space:
mode:
Diffstat (limited to 'test/integration/targets/eos_vlans/tests/cli/idempotent.yaml')
-rw-r--r--test/integration/targets/eos_vlans/tests/cli/idempotent.yaml21
1 files changed, 21 insertions, 0 deletions
diff --git a/test/integration/targets/eos_vlans/tests/cli/idempotent.yaml b/test/integration/targets/eos_vlans/tests/cli/idempotent.yaml
new file mode 100644
index 0000000000..d88e318ba9
--- /dev/null
+++ b/test/integration/targets/eos_vlans/tests/cli/idempotent.yaml
@@ -0,0 +1,21 @@
+---
+- eos_facts:
+ gather_network_resources: vlans
+ become: yes
+
+- name: Ensures that facts are idempotent through replace
+ eos_vlans:
+ config: "{{ ansible_facts.network_resources.vlans }}"
+ state: replaced
+ register: result
+ become: yes
+
+- eos_facts:
+ gather_network_resources: vlans
+ become: yes
+
+- assert:
+ that:
+ - "result.changed == False"
+ - "result.commands == []"
+ - "ansible_facts.network_resources.vlans|symmetric_difference(result.before) == []"