diff options
author | Jordan Borean <jborean93@gmail.com> | 2020-04-01 23:17:50 +0200 |
---|---|---|
committer | GitHub <noreply@github.com> | 2020-04-01 23:17:50 +0200 |
commit | ae1cd27b575a759e9d2477042fc5dbbb3275cd84 (patch) | |
tree | 2e509af15d8af5c43f0170b5051987608c6d1e5d /test | |
parent | Un-migrate url_windows doc fragment (#68602) (diff) | |
download | ansible-ae1cd27b575a759e9d2477042fc5dbbb3275cd84.tar.xz ansible-ae1cd27b575a759e9d2477042fc5dbbb3275cd84.zip |
WebRequest - Fix use_proxy: no on module options (#68603)
* WebRequest - Fix use_proxy: no on module options
* Fix up changelog fragment
Diffstat (limited to 'test')
-rw-r--r-- | test/integration/targets/module_utils_Ansible.ModuleUtils.WebRequest/library/web_request_test.ps1 | 19 |
1 files changed, 19 insertions, 0 deletions
diff --git a/test/integration/targets/module_utils_Ansible.ModuleUtils.WebRequest/library/web_request_test.ps1 b/test/integration/targets/module_utils_Ansible.ModuleUtils.WebRequest/library/web_request_test.ps1 index a1d4db326c..2a7325b6ad 100644 --- a/test/integration/targets/module_utils_Ansible.ModuleUtils.WebRequest/library/web_request_test.ps1 +++ b/test/integration/targets/module_utils_Ansible.ModuleUtils.WebRequest/library/web_request_test.ps1 @@ -436,6 +436,25 @@ $tests = [Ordered]@{ } | ConvertFrom-Json $actual.headers.'User-Agent' | Assert-Equals -Expected 'actual-agent' } + + 'Web request with default proxy' = { + $params = @{ + Uri = "https://$httpbin_host/get" + } + $r = Get-AnsibleWebRequest @params + + $null -ne $r.Proxy | Assert-Equals -Expected $true + } + + 'Web request with no proxy' = { + $params = @{ + Uri = "https://$httpbin_host/get" + UseProxy = $false + } + $r = Get-AnsibleWebRequest @params + + $null -eq $r.Proxy | Assert-Equals -Expected $true + } } # setup and teardown should favour native tools to create and delete the service and not the util we are testing. |