mirror of
https://github.com/ansible-collections/community.general.git
synced 2026-05-06 21:32:49 +00:00
Fix mandatory statement error for junos modules (#50074)
* Fix mandatory statement error for junos modules Fixes #40267 * Add error regex in junos terminal plugin to error out in case of commit fails * If commit fails add logic to discard changes before existing else next task will result in error * Add integration test * Minor update
This commit is contained in:
@@ -43,6 +43,17 @@
|
||||
- "result.changed == true"
|
||||
- "'ge-0/0/2' in result.diff.prepared"
|
||||
|
||||
- name: remove root-authethication (test error scenario)
|
||||
cli_config:
|
||||
config: "delete system root-authentication"
|
||||
ignore_errors: True
|
||||
register: result
|
||||
|
||||
- assert:
|
||||
that:
|
||||
- "result.failed == true"
|
||||
- "'Missing mandatory statement' in result.msg"
|
||||
|
||||
- name: teardown
|
||||
cli_config: *rm1
|
||||
|
||||
|
||||
Reference in New Issue
Block a user