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:
Nathaniel Case 2018-02-02 09:50:15 -05:00 committed by GitHub
commit f3337e1fba
No known key found for this signature in database
GPG key ID: 4AEE18F83AFDEB23
49 changed files with 240 additions and 243 deletions

View file

@ -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

View file

@ -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"]'