ansible/test/integration/targets/eos_smoke/tests/cli/misc_tests.yaml
David Newswanger 712d30f46c
Add eos_smoke integration tests (#36957)
* added eos_smoke tests

* removed left over file

* added note to uncomment broken eapi test when #36919 is fixed

* uncommented fixed test, added unbecome test

* skip become tests when connection=local
2018-04-06 08:16:07 -04:00

26 lines
649 B
YAML

---
- debug: msg="START cli/misc_tests.yaml on connection={{ ansible_connection }}"
# test become and unbecome
- block:
- name: command that does require become (should fail)
eos_command:
commands: show running-config
provider: "{{ cli }}"
become: no
ignore_errors: yes
register: result
- assert:
that:
- 'result.failed == true'
- '"privileged mode required" in result.module_stderr'
- name: command that doesn't require become
eos_command:
commands: show uptime
provider: "{{ cli }}"
become: no
when: "ansible_connection != 'local'"