You cannot select more than 25 topics Topics must start with a letter or number, can include dashes ('-') and can be up to 35 characters long.
ansible/test/integration/targets/exos_vlans/tests/httpapi/deleted.yaml

45 lines
1.1 KiB
YAML

---
- debug:
msg: "Start exos_vlan deleted integration tests ansible_connection={{ ansible_connection }}"
- include_tasks: _reset_config.yaml
- include_tasks: _populate_config.yaml
- block:
- name: Delete VLAN
exos_vlans: &deleted
config:
state: deleted
register: result
- name: Assert that the before dicts were correctly generated
assert:
that:
- "{{ initial_state == result['before']}}"
- name: Assert that correct set of requests were correctly generated
assert:
that:
- "{{deleted['requests'] == result['requests']}}"
- name: Assert that the after dicts were correctly generated
assert:
that:
- "{{deleted['after'] == result['after']}}"
- name: Delete attributes of all configured VLANs (IDEMPOTENT)
exos_vlans: *deleted
register: result
- name: Assert that the previous task was idempotent
assert:
that:
- "result.changed == false"
- name: Assert that the before dicts were correctly generated
assert:
that:
- "{{deleted['after'] == result['before']}}"