summaryrefslogtreecommitdiff
path: root/test/integration/targets/eos_command/tests/cli/invalid.yaml
blob: ed01459aaa7768d6ae6fd72a87031bf709102f3e (plain)
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
---
- debug: msg="START cli/invalid.yaml"

- name: run invalid command
  eos_command:
    commands: ['show foo']
    provider: "{{ cli }}"
  register: result
  ignore_errors: yes

- assert:
    that:
      - "result.failed == true"
      - "result.msg is defined"

- name: run commands that include invalid command
  eos_command:
    commands:
      - show version
      - show foo
    provider: "{{ cli }}"
  register: result
  ignore_errors: yes

- assert:
    that:
      - "result.failed == true"
      - "result.msg is defined"

- debug: msg="END cli/invalid.yaml"