diff options
author | Nathaniel Case <ncase@redhat.com> | 2020-02-03 08:04:08 -0500 |
---|---|---|
committer | GitHub <noreply@github.com> | 2020-02-03 08:04:08 -0500 |
commit | 53c7f8cbdee3c798a6947b834d0640935155d85b (patch) | |
tree | 128d9964d5a92b00a2b8891ddad82c0e277d9bb1 /test/integration/targets/eos_lacp_interfaces/tests/common/replaced.yaml | |
parent | 0ee28c14c21cdddbf03842afb350ef3a1a83f899 (diff) | |
download | ansible-53c7f8cbdee3c798a6947b834d0640935155d85b.tar.gz |
Allow httpapi for EOS resource modules (#66871)
* Redo tests to be transport agnostic
cli -> eos config
* Redirect connection for httpapi
* Fix tests
* Handle missing platform imports
Diffstat (limited to 'test/integration/targets/eos_lacp_interfaces/tests/common/replaced.yaml')
-rw-r--r-- | test/integration/targets/eos_lacp_interfaces/tests/common/replaced.yaml | 41 |
1 files changed, 41 insertions, 0 deletions
diff --git a/test/integration/targets/eos_lacp_interfaces/tests/common/replaced.yaml b/test/integration/targets/eos_lacp_interfaces/tests/common/replaced.yaml new file mode 100644 index 0000000000..f33b32fd15 --- /dev/null +++ b/test/integration/targets/eos_lacp_interfaces/tests/common/replaced.yaml @@ -0,0 +1,41 @@ +--- +- include_tasks: reset_config.yml + +- set_fact: + config: + - name: Ethernet1 + rate: fast + port_priority: 45 + other_config: + - name: Ethernet2 + rate: fast + +- eos_facts: + gather_network_resources: lacp_interfaces + become: yes + +- name: Replaces device configuration of listed vlans with provided configuration + eos_lacp_interfaces: + config: "{{ config }}" + state: replaced + register: result + become: yes + +- assert: + that: + - "ansible_facts.network_resources.lacp_interfaces|symmetric_difference(result.before) == []" + +- eos_facts: + gather_network_resources: lacp_interfaces + become: yes + +- assert: + that: + - "ansible_facts.network_resources.lacp_interfaces|symmetric_difference(result.after) == []" + +- set_fact: + expected_config: "{{ config }} + {{ other_config }}" + +- assert: + that: + - "expected_config|symmetric_difference(ansible_facts.network_resources.lacp_interfaces) == []" |