summaryrefslogtreecommitdiff
path: root/test/integration/targets/win_uri
diff options
context:
space:
mode:
authorDag Wieers <dag@wieers.com>2019-02-28 21:55:18 +0100
committeransibot <ansibot@users.noreply.github.com>2019-02-28 15:55:18 -0500
commit4e6c113bf045948ecc605870a1fec18e8a5e3d3c (patch)
tree1ddd9855a9d9753e06b853cb6cf202d147a03e18 /test/integration/targets/win_uri
parent81ec48c7b49d764a4acb1a9b5b9c9f241ab28a61 (diff)
downloadansible-4e6c113bf045948ecc605870a1fec18e8a5e3d3c.tar.gz
uri/win_uri: Make method a free text field (#49719)
* uri/win_uri: Make method a free text field Since various interfaces introduce their own HTTP method (e.g. like PROPFIND, LIST or TRACE) it's better to leave this up to the user. * Fix HTTP method check in module_utils urls * Add integration test for method UNKNOWN * Clarify the change as requested during review
Diffstat (limited to 'test/integration/targets/win_uri')
-rw-r--r--test/integration/targets/win_uri/tasks/test.yml14
1 files changed, 14 insertions, 0 deletions
diff --git a/test/integration/targets/win_uri/tasks/test.yml b/test/integration/targets/win_uri/tasks/test.yml
index ebeda5e8b9..a23220b0f4 100644
--- a/test/integration/targets/win_uri/tasks/test.yml
+++ b/test/integration/targets/win_uri/tasks/test.yml
@@ -336,6 +336,20 @@
- get_custom_header.json.headers['Test-Header'] == 'hello'
- get_custom_header.json.headers['Another-Header'] == 'world'
+- name: Validate invalid method
+ win_uri:
+ url: https://{{ httpbin_host }}/anything
+ method: UNKNOWN
+ register: invalid_method
+ ignore_errors: yes
+
+- name: Assert invalid method fails
+ assert:
+ that:
+ - invalid_method is failure
+ - invalid_method.status_code == 405
+ - invalid_method.status_description == 'METHOD NOT ALLOWED'
+
# client cert auth tests
- name: get request with timeout