summaryrefslogtreecommitdiff
path: root/test/integration/targets
diff options
context:
space:
mode:
authorAbhijeet Kasurde <akasurde@redhat.com>2017-06-19 01:58:33 +0530
committerRené Moser <mail@renemoser.net>2017-06-18 22:28:33 +0200
commit7348a613bbd51652862a99a1ae47090e762750b7 (patch)
tree6b6454244e5c952e61e6bda0413a6b345761deaa /test/integration/targets
parent561d678f52e14df7fc0a52f719efd7242a4df44a (diff)
downloadansible-7348a613bbd51652862a99a1ae47090e762750b7.tar.gz
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>
Diffstat (limited to 'test/integration/targets')
-rw-r--r--test/integration/targets/hg/tasks/main.yml12
1 files changed, 12 insertions, 0 deletions
diff --git a/test/integration/targets/hg/tasks/main.yml b/test/integration/targets/hg/tasks/main.yml
index 03b3458ede..f9c1b1494b 100644
--- a/test/integration/targets/hg/tasks/main.yml
+++ b/test/integration/targets/hg/tasks/main.yml
@@ -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"