summaryrefslogtreecommitdiff
path: root/test/integration/targets/exos_l2_interfaces/tests/httpapi/deleted.yaml
diff options
context:
space:
mode:
Diffstat (limited to 'test/integration/targets/exos_l2_interfaces/tests/httpapi/deleted.yaml')
-rw-r--r--test/integration/targets/exos_l2_interfaces/tests/httpapi/deleted.yaml96
1 files changed, 0 insertions, 96 deletions
diff --git a/test/integration/targets/exos_l2_interfaces/tests/httpapi/deleted.yaml b/test/integration/targets/exos_l2_interfaces/tests/httpapi/deleted.yaml
deleted file mode 100644
index 23921ee9a2..0000000000
--- a/test/integration/targets/exos_l2_interfaces/tests/httpapi/deleted.yaml
+++ /dev/null
@@ -1,96 +0,0 @@
----
-- debug:
- msg: "Start exos_l2_interfaces deleted integration tests ansible_connection={{ ansible_connection }}"
-
-- include_tasks: _reset_config.yaml
- ignore_errors: yes
-
-- include_tasks: _populate_config.yaml
-
-- set_fact:
- config:
- - access:
- vlan: 1
- name: '2'
- trunk: null
- - access:
- vlan: 1
- name: '3'
- trunk: null
- config_all:
- - access:
- vlan: 1
- name: '1'
- trunk: null
-
-- exos_facts:
- gather_network_resources: l2_interfaces
-
-- block:
- - name: Delete L2 interface configuration
- exos_l2_interfaces: &deleted
- config:
- - name: '2'
- - name: '3'
- state: deleted
- register: result
-
- - name: Assert that correct set of results were generated
- assert:
- that:
- - "deleted['requests_1']|symmetric_difference(result['requests']) == []"
- - "ansible_facts.network_resources.l2_interfaces|symmetric_difference(result.before) == []"
-
- - exos_facts:
- gather_network_resources: l2_interfaces
-
- - name: Assert that after dicts were correctly generated
- assert:
- that:
- - "ansible_facts.network_resources.l2_interfaces|symmetric_difference(result.after) == []"
- - "config|difference(ansible_facts.network_resources.l2_interfaces) == []"
-
- - name: Delete L2 interface configuration
- exos_l2_interfaces:
- config:
- state: deleted
- register: result
-
- - name: Assert that correct set of results were generated
- assert:
- that:
- - "deleted['requests_2']|symmetric_difference(result['requests']) == []"
- - "ansible_facts.network_resources.l2_interfaces|symmetric_difference(result.before) == []"
-
- - exos_facts:
- gather_network_resources: l2_interfaces
-
- - name: Assert that after dicts were correctly generated
- assert:
- that:
- - "ansible_facts.network_resources.l2_interfaces|symmetric_difference(result.after) == []"
- - "config_all|difference(ansible_facts.network_resources.l2_interfaces) == []"
-
- - name: Delete attributes of all configured interfaces (IDEMPOTENT)
- exos_l2_interfaces: *deleted
- register: result
-
- - name: Assert that the previous task was idempotent
- assert:
- that:
- - "result.changed == false"
-
- - exos_facts:
- gather_network_resources: l2_interfaces
-
- - name: Assert that the before dicts were correctly generated
- assert:
- that:
- - "ansible_facts.network_resources.l2_interfaces|symmetric_difference(result.before) == []"
-
- - set_fact:
- expected_config: "{{ config }} + {{ config_all }}"
-
- - assert:
- that:
- - "expected_config|difference(ansible_facts.network_resources.l2_interfaces) == []"