summaryrefslogtreecommitdiff
path: root/tests/integration/targets/vyos_lag_interfaces/tests/cli/parsed.yaml
diff options
context:
space:
mode:
Diffstat (limited to 'tests/integration/targets/vyos_lag_interfaces/tests/cli/parsed.yaml')
-rw-r--r--tests/integration/targets/vyos_lag_interfaces/tests/cli/parsed.yaml41
1 files changed, 41 insertions, 0 deletions
diff --git a/tests/integration/targets/vyos_lag_interfaces/tests/cli/parsed.yaml b/tests/integration/targets/vyos_lag_interfaces/tests/cli/parsed.yaml
new file mode 100644
index 0000000..64e7780
--- /dev/null
+++ b/tests/integration/targets/vyos_lag_interfaces/tests/cli/parsed.yaml
@@ -0,0 +1,41 @@
+---
+- debug:
+ msg: START vyos_lag_interfaces parsed integration tests on connection={{ ansible_connection
+ }}
+
+- include_tasks: _remove_config.yaml
+
+- include_tasks: _populate.yaml
+
+- block:
+
+ - name: Gather lag_interfaces facts
+ register: lag_interfaces_facts
+ vyos.vyos.vyos_facts:
+ gather_subset:
+ - default
+ gather_network_resources:
+ - lag_interfaces
+
+ - name: Provide the running configuration for parsing (config to be parsed)
+ register: result
+ vyos.vyos.vyos_lag_interfaces: &id001
+ running_config: "{{ lookup('file', '_parsed_config.cfg') }}"
+ state: parsed
+
+ - name: Assert that correct parsing done
+ assert:
+ that: "{{ ansible_facts['network_resources']['lag_interfaces'] | symmetric_difference(result['parsed'])\
+ \ |length == 0 }}"
+
+ - name: Gather the existing running configuration (IDEMPOTENT)
+ register: result
+ vyos.vyos.vyos_lag_interfaces: *id001
+
+ - name: Assert that the previous task was idempotent
+ assert:
+ that:
+ - result['changed'] == false
+ always:
+
+ - include_tasks: _remove_config.yaml \ No newline at end of file