mirror of
https://github.com/ansible-collections/community.general.git
synced 2025-07-22 12:50:22 -07:00
win_uri: return response info on non 200 responses, convert DateTime values to ISO 8601 (#37104)
This commit is contained in:
parent
bd43776acf
commit
c1f5e11cdf
2 changed files with 41 additions and 8 deletions
|
@ -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
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue