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
parent d7d9e40dd1
commit f3337e1fba
49 changed files with 240 additions and 243 deletions

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