diff options
author | Jordan Borean <jborean93@gmail.com> | 2018-03-08 09:43:42 +1000 |
---|---|---|
committer | GitHub <noreply@github.com> | 2018-03-08 09:43:42 +1000 |
commit | c1f5e11cdff500a43a657df436316db8deb51321 (patch) | |
tree | 39f2532e4ccf5343d6e76bb6769628ed18576157 /test/integration/targets/win_uri | |
parent | bd43776acf8133b43ac2fe855259723a1cb93f88 (diff) | |
download | ansible-c1f5e11cdff500a43a657df436316db8deb51321.tar.gz |
win_uri: return response info on non 200 responses, convert DateTime values to ISO 8601 (#37104)
Diffstat (limited to 'test/integration/targets/win_uri')
-rw-r--r-- | test/integration/targets/win_uri/tasks/test.yml | 18 |
1 files changed, 18 insertions, 0 deletions
diff --git a/test/integration/targets/win_uri/tasks/test.yml b/test/integration/targets/win_uri/tasks/test.yml index bf1333afbf..206648d743 100644 --- a/test/integration/targets/win_uri/tasks/test.yml +++ b/test/integration/targets/win_uri/tasks/test.yml @@ -320,3 +320,21 @@ timeout: 5 register: get_with_timeout_fail failed_when: '"The operation has timed out" not in get_with_timeout_fail.msg' + +- name: connect to fakepath that does not exist + win_uri: + url: http://{{httpbin_host}}/fakepath + status_code: 404 + return_content: yes + register: invalid_path + +# verifies the return values are still set on a non 200 response +- name: assert connect to fakepath that does not exist + assert: + that: + - not invalid_path.changed + - invalid_path.status_code == 404 + - invalid_path.status_description == 'NOT FOUND' + - invalid_path.content is defined + - invalid_path.method == 'GET' + - invalid_path.connection is defined |