mirror of
https://github.com/ansible-collections/community.general.git
synced 2025-07-23 05:10:22 -07:00
ios test changes (#35510)
* Fix over-byte * Update ios tests to call `provider` To continue to support testing `connection: local` * Fix command dict handling in ios_user * Clean up unit tests, too
This commit is contained in:
parent
d7d9e40dd1
commit
f3337e1fba
49 changed files with 240 additions and 243 deletions
|
@ -6,7 +6,7 @@
|
|||
privilege: 15
|
||||
role: network-operator
|
||||
state: present
|
||||
authorize: yes
|
||||
provider: "{{ cli }}"
|
||||
configured_password: pass123
|
||||
|
||||
- name: test login
|
||||
|
@ -33,7 +33,7 @@
|
|||
ios_user:
|
||||
name: auth_user
|
||||
state: absent
|
||||
authorize: yes
|
||||
provider: "{{ cli }}"
|
||||
register: result
|
||||
|
||||
- name: reset connection
|
||||
|
|
|
@ -6,7 +6,7 @@
|
|||
- name: ansibletest2
|
||||
- name: ansibletest3
|
||||
state: absent
|
||||
authorize: yes
|
||||
provider: "{{ cli }}"
|
||||
|
||||
- name: Create user (SetUp)
|
||||
ios_user:
|
||||
|
@ -14,7 +14,7 @@
|
|||
privilege: 15
|
||||
role: network-operator
|
||||
state: present
|
||||
authorize: yes
|
||||
provider: "{{ cli }}"
|
||||
register: result
|
||||
|
||||
- assert:
|
||||
|
@ -27,7 +27,7 @@
|
|||
aggregate:
|
||||
- name: ansibletest2
|
||||
- name: ansibletest3
|
||||
authorize: yes
|
||||
provider: "{{ cli }}"
|
||||
state: present
|
||||
view: network-admin
|
||||
register: result
|
||||
|
@ -43,7 +43,7 @@
|
|||
privilege: 15
|
||||
role: network-operator
|
||||
state: present
|
||||
authorize: yes
|
||||
provider: "{{ cli }}"
|
||||
register: result
|
||||
|
||||
- assert:
|
||||
|
@ -56,7 +56,7 @@
|
|||
aggregate:
|
||||
- name: ansibletest2
|
||||
- name: ansibletest3
|
||||
authorize: yes
|
||||
provider: "{{ cli }}"
|
||||
state: present
|
||||
view: network-admin
|
||||
register: result
|
||||
|
@ -73,12 +73,12 @@
|
|||
- name: ansibletest2
|
||||
- name: ansibletest3
|
||||
state: absent
|
||||
authorize: yes
|
||||
provider: "{{ cli }}"
|
||||
register: result
|
||||
|
||||
- assert:
|
||||
that:
|
||||
- 'result.changed == true'
|
||||
- '"no username ansibletest1" in result.commands[0]'
|
||||
- '"no username ansibletest2" in result.commands[1]'
|
||||
- '"no username ansibletest3" in result.commands[2]'
|
||||
- '"no username ansibletest1" in result.commands[0]["command"]'
|
||||
- '"no username ansibletest2" in result.commands[1]["command"]'
|
||||
- '"no username ansibletest3" in result.commands[2]["command"]'
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue