summaryrefslogtreecommitdiff
path: root/test/integration/targets/ops_command/tests/cli/invalid.yaml
diff options
context:
space:
mode:
Diffstat (limited to 'test/integration/targets/ops_command/tests/cli/invalid.yaml')
-rw-r--r--test/integration/targets/ops_command/tests/cli/invalid.yaml28
1 files changed, 28 insertions, 0 deletions
diff --git a/test/integration/targets/ops_command/tests/cli/invalid.yaml b/test/integration/targets/ops_command/tests/cli/invalid.yaml
new file mode 100644
index 0000000000..7be4dd6611
--- /dev/null
+++ b/test/integration/targets/ops_command/tests/cli/invalid.yaml
@@ -0,0 +1,28 @@
+---
+- 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"