mirror of
https://github.com/ansible-collections/community.general.git
synced 2025-10-22 20:13:59 -07:00
Fix eapi tests to use become (#40838)
* Return the expected prompt character based on become status * Update eos_banner tests for eapi * Update eos_config tests for eapi * Update eos_facts tests for eapi * Update eos_interface tests for eapi * Update eos_l3_interface tests for eapi * Update eos_lldp tests for eapi * Update eos_logging tests for eapi * Update eos_smoke tests for eapi * Update eos_system tests for eapi
This commit is contained in:
parent
669949e6a3
commit
20f93816d6
59 changed files with 217 additions and 490 deletions
|
@ -9,8 +9,6 @@
|
|||
become: yes
|
||||
register: result
|
||||
|
||||
|
||||
|
||||
- assert:
|
||||
that:
|
||||
# _facts modules should never report a change
|
||||
|
|
|
@ -1,5 +1,5 @@
|
|||
---
|
||||
- debug: msg="START cli/not_hardware_facts.yaml on connection={{ ansible_connection }}"
|
||||
- debug: msg="START cli/not_hardware.yaml on connection={{ ansible_connection }}"
|
||||
|
||||
|
||||
- name: test not hardware
|
||||
|
@ -27,4 +27,4 @@
|
|||
# ... and not present
|
||||
- "result.ansible_facts.ansible_net_filesystems is not defined"
|
||||
|
||||
- debug: msg="END cli/not_hardware_facts.yaml on connection={{ ansible_connection }}"
|
||||
- debug: msg="END cli/not_hardware.yaml on connection={{ ansible_connection }}"
|
||||
|
|
|
@ -4,12 +4,13 @@
|
|||
- name: Make sure LLDP is running (setup)
|
||||
eos_config:
|
||||
lines: lldp run
|
||||
authorize: yes
|
||||
become: yes
|
||||
|
||||
- name: test getting all facts
|
||||
eos_facts:
|
||||
gather_subset:
|
||||
- all
|
||||
become: yes
|
||||
register: result
|
||||
|
||||
- assert:
|
||||
|
@ -29,9 +30,4 @@
|
|||
- "result.ansible_facts.ansible_net_memfree_mb > 1"
|
||||
- "result.ansible_facts.ansible_net_memtotal_mb > 1"
|
||||
|
||||
- name: Make sure LLDP is running (teardown)
|
||||
eos_config:
|
||||
lines: no lldp run
|
||||
authorize: yes
|
||||
|
||||
- debug: msg="END eapi/all_facts.yaml"
|
||||
|
|
|
@ -4,10 +4,11 @@
|
|||
- name: Make sure LLDP is running (setup)
|
||||
eos_config:
|
||||
lines: lldp run
|
||||
authorize: yes
|
||||
become: yes
|
||||
|
||||
- name: test getting default facts
|
||||
eos_facts:
|
||||
become: yes
|
||||
register: result
|
||||
|
||||
- assert:
|
||||
|
@ -31,9 +32,4 @@
|
|||
# ... and not present
|
||||
- "result.ansible_facts.ansible_net_config is not defined" # config
|
||||
|
||||
- name: Make sure LLDP is running (setup)
|
||||
eos_config:
|
||||
lines: lldp run
|
||||
authorize: yes
|
||||
|
||||
- debug: msg="END eapi/default.yaml"
|
||||
|
|
|
@ -1,15 +1,16 @@
|
|||
---
|
||||
- debug: msg="START eapi/not_hardware_facts.yaml"
|
||||
- debug: msg="START eapi/not_hardware.yaml"
|
||||
|
||||
- name: Make sure LLDP is running (setup)
|
||||
eos_config:
|
||||
lines: lldp run
|
||||
authorize: yes
|
||||
become: yes
|
||||
|
||||
- name: test not hardware
|
||||
eos_facts:
|
||||
gather_subset:
|
||||
- "!hardware"
|
||||
become: yes
|
||||
register: result
|
||||
|
||||
- assert:
|
||||
|
@ -30,9 +31,4 @@
|
|||
# ... and not present
|
||||
- "result.ansible_facts.ansible_net_filesystems is not defined"
|
||||
|
||||
- name: Make sure LLDP is running (teardown)
|
||||
eos_config:
|
||||
lines: no lldp run
|
||||
authorize: yes
|
||||
|
||||
- debug: msg="END eapi/not_hardware_facts.yaml"
|
||||
- debug: msg="END eapi/not_hardware.yaml"
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue