mirror of
https://github.com/ansible-collections/community.general.git
synced 2024-09-14 20:13:21 +02:00
Delete targets/ops_command as module no longer exists (#28868)
This commit is contained in:
parent
07acc579db
commit
5dae6a6392
8 changed files with 0 additions and 136 deletions
|
@ -1,3 +0,0 @@
|
|||
---
|
||||
testcase: "*"
|
||||
test_cases: []
|
|
@ -1,15 +0,0 @@
|
|||
---
|
||||
- name: collect all cli test cases
|
||||
find:
|
||||
paths: "{{ role_path }}/tests/cli"
|
||||
patterns: "{{ testcase }}.yaml"
|
||||
register: test_cases
|
||||
|
||||
- name: set test_items
|
||||
set_fact: test_items="{{ test_cases.files | map(attribute='path') | list }}"
|
||||
|
||||
- name: run test case
|
||||
include: "{{ test_case_to_run }}"
|
||||
with_items: "{{ test_items }}"
|
||||
loop_control:
|
||||
loop_var: test_case_to_run
|
|
@ -1,2 +0,0 @@
|
|||
---
|
||||
- { include: cli.yaml, tags: ['cli'] }
|
|
@ -1,20 +0,0 @@
|
|||
---
|
||||
- debug: msg="START cli/bad_operator.yaml"
|
||||
|
||||
- name: test bad operator
|
||||
ops_command:
|
||||
commands:
|
||||
- show version
|
||||
- show interfaces
|
||||
wait_for:
|
||||
- result[0] contains 'Description: Foo'
|
||||
provider: "{{ cli }}"
|
||||
register: result
|
||||
ignore_errors: yes
|
||||
|
||||
- assert:
|
||||
that:
|
||||
- "result.failed == true"
|
||||
- "result.msg is defined"
|
||||
|
||||
- debug: msg="END cli/bad_operator.yaml"
|
|
@ -1,20 +0,0 @@
|
|||
---
|
||||
- debug: msg="START cli/contains.yaml"
|
||||
|
||||
- name: test contains operator
|
||||
ops_command:
|
||||
commands:
|
||||
- show version
|
||||
- show interface eth1
|
||||
wait_for:
|
||||
- "result[0] contains OpenSwitch"
|
||||
- "result[1] contains 'Interface eth1'"
|
||||
provider: "{{ cli }}"
|
||||
register: result
|
||||
|
||||
- assert:
|
||||
that:
|
||||
- "result.changed == false"
|
||||
- "result.stdout is defined"
|
||||
|
||||
- debug: msg="END cli/contains.yaml"
|
|
@ -1,28 +0,0 @@
|
|||
---
|
||||
- debug: msg="START cli/invalid.yaml"
|
||||
|
||||
- name: run invalid command
|
||||
ops_command:
|
||||
commands: ['show foo']
|
||||
provider: "{{ cli }}"
|
||||
register: result
|
||||
ignore_errors: yes
|
||||
|
||||
- assert:
|
||||
that:
|
||||
- "result.failed"
|
||||
|
||||
- name: run commands that include invalid command
|
||||
ops_command:
|
||||
commands:
|
||||
- show version
|
||||
- show foo
|
||||
provider: "{{ cli }}"
|
||||
register: result
|
||||
ignore_errors: yes
|
||||
|
||||
- assert:
|
||||
that:
|
||||
- "result.failed"
|
||||
|
||||
- debug: msg="END cli/invalid.yaml"
|
|
@ -1,29 +0,0 @@
|
|||
---
|
||||
- debug: msg="START cli/output.yaml"
|
||||
|
||||
- name: get output for single command
|
||||
ops_command:
|
||||
commands: ['show version']
|
||||
provider: "{{ cli }}"
|
||||
register: result
|
||||
|
||||
- assert:
|
||||
that:
|
||||
- "result.changed == false"
|
||||
- "result.stdout is defined"
|
||||
|
||||
- name: get output for multiple commands
|
||||
ops_command:
|
||||
commands:
|
||||
- show version
|
||||
- show interface
|
||||
provider: "{{ cli }}"
|
||||
register: result
|
||||
|
||||
- assert:
|
||||
that:
|
||||
- "result.changed == false"
|
||||
- "result.stdout is defined"
|
||||
- "result.stdout | length == 2"
|
||||
|
||||
- debug: msg="END cli/output.yaml"
|
|
@ -1,19 +0,0 @@
|
|||
---
|
||||
- debug: msg="START cli/timeout.yaml"
|
||||
|
||||
- name: test bad condition
|
||||
ops_command:
|
||||
commands:
|
||||
- show version
|
||||
wait_for:
|
||||
- "result[0] contains bad_value_string"
|
||||
provider: "{{ cli }}"
|
||||
register: result
|
||||
ignore_errors: yes
|
||||
|
||||
- assert:
|
||||
that:
|
||||
- "result.failed == true"
|
||||
- "result.msg is defined"
|
||||
|
||||
- debug: msg="END cli/timeout.yaml"
|
Loading…
Reference in a new issue