8b3ff933af
* module_utils checkin Signed-off-by: rohitthakur2590 <rohitthakur2590@outlook.com> * vyos lldp_interfaces merging Signed-off-by: rohitthakur2590 <rohitthakur2590@outlook.com> * shippable fix Signed-off-by: rohitthakur2590 <rohitthakur2590@outlook.com> * merge changes Signed-off-by: rohitthakur2590 <rohitthakur2590@outlook.com> * failure added in ignore list Signed-off-by: rohitthakur2590 <rohitthakur2590@outlook.com> * comments incorporated Signed-off-by: rohitthakur2590 <rohitthakur2590@outlook.com> * comments incorporated Signed-off-by: rohitthakur2590 <rohitthakur2590@outlook.com> * test cases updated Signed-off-by: rohitthakur2590 <rohitthakur2590@outlook.com> * remove global commands Signed-off-by: rohitthakur2590 <rohitthakur2590@outlook.com>
49 lines
1.5 KiB
YAML
49 lines
1.5 KiB
YAML
---
|
|
- debug:
|
|
msg: "START vyos_lldp_interfaces overridden integration tests on connection={{ ansible_connection }}"
|
|
|
|
- include_tasks: _remove_config.yaml
|
|
|
|
- include_tasks: _populate_intf.yaml
|
|
|
|
- block:
|
|
- name: Overrides all device configuration with provided configuration
|
|
vyos_lldp_interfaces: &overridden
|
|
config:
|
|
- name: 'eth2'
|
|
location:
|
|
elin: '0000000911'
|
|
state: overridden
|
|
register: result
|
|
|
|
- name: Assert that before dicts were correctly generated
|
|
assert:
|
|
that:
|
|
- "{{ populate_intf | symmetric_difference(result['before']) |length == 0 }}"
|
|
|
|
- name: Assert that correct commands were generated
|
|
assert:
|
|
that:
|
|
- "{{ overridden['commands'] | symmetric_difference(result['commands']) |length == 0 }}"
|
|
|
|
- name: Assert that after dicts were correctly generated
|
|
assert:
|
|
that:
|
|
- "{{ overridden['after'] | symmetric_difference(result['after']) |length == 0 }}"
|
|
|
|
- name: Overrides all device configuration with provided configurations (IDEMPOTENT)
|
|
vyos_lldp_interfaces: *overridden
|
|
register: result
|
|
|
|
- name: Assert that the previous task was idempotent
|
|
assert:
|
|
that:
|
|
- "result['changed'] == false"
|
|
|
|
- name: Assert that before dicts were correctly generated
|
|
assert:
|
|
that:
|
|
- "{{ overridden['after'] | symmetric_difference(result['before']) |length == 0 }}"
|
|
|
|
always:
|
|
- include_tasks: _remove_config.yaml
|