mirror of
https://github.com/ansible-collections/community.general.git
synced 2025-07-24 05:40:23 -07:00
Correct usage of fail_json in hg module (#25847)
Fix adds correct usage for fail_json and also adds testcases to verify this. Signed-off-by: Abhijeet Kasurde <akasurde@redhat.com>
This commit is contained in:
parent
561d678f52
commit
7348a613bb
2 changed files with 13 additions and 1 deletions
|
@ -72,3 +72,15 @@
|
|||
assert:
|
||||
that:
|
||||
- "not hg_result2.changed"
|
||||
|
||||
- name: Checkout non-existent repo clone
|
||||
hg: repo=https://bitbucket.org/pyro46/pythonscript_1 clone=no update=no
|
||||
register: hg_result3
|
||||
ignore_errors: true
|
||||
|
||||
- name: Verify result of non-existent repo clone
|
||||
assert:
|
||||
that:
|
||||
- hg_result3.msg
|
||||
- "'abort: HTTP Error 404: Not Found' in hg_result3.msg"
|
||||
- "not hg_result3.changed"
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue