ansible/test/integration/targets/iosxr_config/tests/cli/comment-too-long.yaml
John R Barker 553b6151ad iosxr tests: Initial work for 2.3 (#20883)
Ensure a loopback device exists for testing
Remove provider:
Default is to run task on Network, device, use delegate_to: localhost for local tasks.
2017-01-31 19:10:14 +00:00

30 lines
849 B
YAML

---
- debug: msg="START cli/comment-too-long.yaml"
- name: setup
iosxr_config:
commands:
- no description
- no shutdown
parents:
- interface Loopback999
match: none
# Defend against https://github.com/ansible/ansible-modules-core/issues/5146
- name: Commit message too long
iosxr_config:
src: basic/config.j2
comment: "this is a really long message aaaaabbbbbbcdde end-of-message"
register: result
ignore_errors: true
- assert:
that:
- "result.changed == false"
- "result.updates is not defined"
# Defend https://github.com/ansible/ansible-modules-core/issues/5146
- "'comment argument cannot be more than 60 characters' in result.msg"
# Check for the correct error message (and not a generic "Invalid input detected") once fixed
- debug: msg="END cli/comment-too-long.yaml"