mirror of
https://github.com/ansible-collections/community.general.git
synced 2026-05-07 05:42:50 +00: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:
@@ -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
|
||||
|
||||
@@ -6,6 +6,7 @@
|
||||
name: 172.16.0.1
|
||||
state: absent
|
||||
authorize: yes
|
||||
become: yes
|
||||
|
||||
- name: Remove console
|
||||
ios_logging:
|
||||
@@ -13,6 +14,7 @@
|
||||
level: warnings
|
||||
state: absent
|
||||
authorize: yes
|
||||
become: yes
|
||||
|
||||
- name: Remove buffer
|
||||
ios_logging:
|
||||
@@ -20,6 +22,7 @@
|
||||
size: 8000
|
||||
authorize: yes
|
||||
state: absent
|
||||
become: yes
|
||||
|
||||
# start tests
|
||||
- name: Set up host logging
|
||||
@@ -29,6 +32,7 @@
|
||||
facility: local7
|
||||
state: present
|
||||
authorize: yes
|
||||
become: yes
|
||||
register: result
|
||||
|
||||
- assert:
|
||||
@@ -43,6 +47,7 @@
|
||||
name: 172.16.0.1
|
||||
state: present
|
||||
authorize: yes
|
||||
become: yes
|
||||
register: result
|
||||
|
||||
- assert:
|
||||
@@ -55,6 +60,7 @@
|
||||
name: 172.16.0.1
|
||||
state: absent
|
||||
authorize: yes
|
||||
become: yes
|
||||
register: result
|
||||
|
||||
- assert:
|
||||
@@ -68,6 +74,7 @@
|
||||
name: 172.16.0.1
|
||||
state: absent
|
||||
authorize: yes
|
||||
become: yes
|
||||
register: result
|
||||
|
||||
- assert:
|
||||
@@ -80,6 +87,7 @@
|
||||
level: warnings
|
||||
state: present
|
||||
authorize: yes
|
||||
become: yes
|
||||
register: result
|
||||
|
||||
- assert:
|
||||
@@ -92,6 +100,7 @@
|
||||
dest: buffered
|
||||
size: 8000
|
||||
authorize: yes
|
||||
become: yes
|
||||
register: result
|
||||
|
||||
- assert:
|
||||
@@ -105,6 +114,7 @@
|
||||
- { dest: console, level: notifications }
|
||||
- { dest: buffered, size: 9000 }
|
||||
authorize: yes
|
||||
become: yes
|
||||
register: result
|
||||
|
||||
- assert:
|
||||
@@ -120,6 +130,7 @@
|
||||
- { dest: buffered, size: 9000 }
|
||||
state: absent
|
||||
authorize: yes
|
||||
become: yes
|
||||
register: result
|
||||
|
||||
- assert:
|
||||
|
||||
Reference in New Issue
Block a user