ansible/test/integration/targets/iosxr_config/tests/cli/comment-too-long.yaml
Nathaniel Case 2e76c89910
IOS XR cli tests move to network_cli (#34007)
* Update task definitions for network_cli

* Add connection to debug messages

* Specify connection for prepare task

* pc won't be around for connection=network_cli

* Assorted Python 3 fixes

* Give default port if ansible_ssh_port missing

* delegate -> connection

* Extend error regex
2017-12-20 11:26:09 -05:00

30 lines
927 B
YAML

---
- debug: msg="START cli/comment-too-long.yaml on connection={{ ansible_connection }}"
- 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 on connection={{ ansible_connection }}"