Merge branch 'v2_final' into devel_switch_v2

This commit is contained in:
James Cammarata 2015-05-28 15:27:09 -05:00
commit 60bea844b3
2 changed files with 52 additions and 17 deletions

View file

@ -25,3 +25,23 @@
that:
- result.changed
- '"OK" in result.msg'
- name: test https fetch to a site with invalid domain
get_url:
url: "https://kennethreitz.org/"
dest: "{{ output_dir }}/shouldnotexist.html"
ignore_errors: True
register: result
- stat:
path: "{{ output_dir }}/shouldnotexist.html"
register: stat_result
- debug: var=result
- name: Assert that the file was not downloaded
assert:
that:
- "result.failed == true"
- "'Certificate does not belong to ' in result.msg"
- "stat_result.stat.exists == false"