ansible/test/integration/targets/ios_facts/tests/cli/invalid_subset.yaml
John R Barker a12033a6e0 integration/targets/ios_* work to support IOS (#20414)
* WIP

* Don't set connection: network_cli in the playbook

* ios_config tests now passing

* Create test loopback device

* delete

* ios_* pass (apart from ios_facts)

* Remove provider lines
2017-01-20 20:18:12 +00:00

46 lines
927 B
YAML

---
- debug: msg="START cli/invalid_subset.yaml"
- name: test invalid subset (foobar)
ios_facts:
gather_subset:
- "foobar"
register: result
ignore_errors: true
- assert:
that:
# Failures shouldn't return changes
- "result.changed == false"
# It's a failure
- "result.failed == true"
# Sensible Failure message
- "result.msg == 'Bad subset'"
###############
# FIXME Future
# We may in the future want to add a test for
- name: test subset specified multiple times
ios_facts:
gather_subset:
- "!hardware"
- "hardware"
register: result
ignore_errors: true
- assert:
that:
# Failures shouldn't return changes
- "result.changed == false"
# It's a failure
- "result.failed == true"
# Sensible Failure message
- "result.msg == 'Bad subset'"
ignore_errors: true
- debug: msg="END cli/invalid_subset.yaml"