mirror of
https://github.com/ansible-collections/community.general.git
synced 2025-07-22 12:50:22 -07:00
ios integration tests to network_cli (#33920)
* Preliminary steps * Fix Python3 network_cli ios * Add connection to debug strings * Fix ios confirm prompt by way of optional newline Also update ios_user delete tests
This commit is contained in:
parent
8d5c8b252d
commit
cb1b705218
56 changed files with 358 additions and 102 deletions
|
@ -4,12 +4,19 @@
|
|||
paths: "{{ role_path }}/tests/cli"
|
||||
patterns: "{{ testcase }}.yaml"
|
||||
register: test_cases
|
||||
delegate_to: localhost
|
||||
|
||||
- name: set test_items
|
||||
set_fact: test_items="{{ test_cases.files | map(attribute='path') | list }}"
|
||||
|
||||
- name: run test case
|
||||
include: "{{ test_case_to_run }}"
|
||||
- name: run test cases (connection=network_cli)
|
||||
include: "{{ test_case_to_run }} ansible_connection=network_cli"
|
||||
with_items: "{{ test_items }}"
|
||||
loop_control:
|
||||
loop_var: test_case_to_run
|
||||
|
||||
- name: run test case (connection=local)
|
||||
include: "{{ test_case_to_run }} ansible_connection=local ansible_become=no"
|
||||
with_first_found: "{{ test_items }}"
|
||||
loop_control:
|
||||
loop_var: test_case_to_run
|
||||
|
|
|
@ -8,6 +8,7 @@
|
|||
state: present
|
||||
authorize: yes
|
||||
configured_password: pass123
|
||||
become: yes
|
||||
|
||||
- name: test login
|
||||
expect:
|
||||
|
@ -34,6 +35,7 @@
|
|||
name: auth_user
|
||||
state: absent
|
||||
authorize: yes
|
||||
become: yes
|
||||
register: result
|
||||
|
||||
- name: reset connection
|
||||
|
|
|
@ -7,7 +7,7 @@
|
|||
- name: ansibletest3
|
||||
state: absent
|
||||
authorize: yes
|
||||
register: result
|
||||
become: yes
|
||||
|
||||
- name: Create user (SetUp)
|
||||
ios_user:
|
||||
|
@ -16,6 +16,7 @@
|
|||
role: network-operator
|
||||
state: present
|
||||
authorize: yes
|
||||
become: yes
|
||||
register: result
|
||||
|
||||
- assert:
|
||||
|
@ -31,6 +32,7 @@
|
|||
authorize: yes
|
||||
state: present
|
||||
view: network-admin
|
||||
become: yes
|
||||
register: result
|
||||
|
||||
- assert:
|
||||
|
@ -45,6 +47,7 @@
|
|||
role: network-operator
|
||||
state: present
|
||||
authorize: yes
|
||||
become: yes
|
||||
register: result
|
||||
|
||||
- assert:
|
||||
|
@ -60,6 +63,7 @@
|
|||
authorize: yes
|
||||
state: present
|
||||
view: network-admin
|
||||
become: yes
|
||||
register: result
|
||||
|
||||
- assert:
|
||||
|
@ -75,6 +79,7 @@
|
|||
- name: ansibletest3
|
||||
state: absent
|
||||
authorize: yes
|
||||
become: yes
|
||||
register: result
|
||||
|
||||
- assert:
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue