diff options
author | h4rr21 <juankchess13@hotmail.com> | 2022-04-06 19:21:49 +0200 |
---|---|---|
committer | GitHub <noreply@github.com> | 2022-04-06 19:21:49 +0200 |
commit | 1d9c68d27e10b6023d294d48e873ba4cdde46bbb (patch) | |
tree | bd3475b9f122c1f08ed0ccb200330adebffa92cf /test/integration/targets/uri | |
parent | Hide "[WARNING]: No inventory was parsed" message (#65499) (diff) | |
download | ansible-1d9c68d27e10b6023d294d48e873ba4cdde46bbb.tar.xz ansible-1d9c68d27e10b6023d294d48e873ba4cdde46bbb.zip |
honor use_proxy parameter (#77312)
* honor use_proxy parameter
* fix uri test with "use_proxy: no"
* fix urls.py module
Co-authored-by: Carlos <Juan.Carlos.Cardenas.Viera@ibm.com>
Diffstat (limited to 'test/integration/targets/uri')
-rw-r--r-- | test/integration/targets/uri/tasks/main.yml | 20 |
1 files changed, 20 insertions, 0 deletions
diff --git a/test/integration/targets/uri/tasks/main.yml b/test/integration/targets/uri/tasks/main.yml index 1d560e5c40..a6ba646d0a 100644 --- a/test/integration/targets/uri/tasks/main.yml +++ b/test/integration/targets/uri/tasks/main.yml @@ -301,6 +301,26 @@ that: - 'result.allow.split(", ")|sort == ["GET", "HEAD", "OPTIONS"]' +- name: Testing support of https_proxy (with failure expected) + environment: + https_proxy: 'https://localhost:3456' + uri: + url: 'https://httpbin.org/get' + register: result + ignore_errors: true + +- assert: + that: + - result is failed + - result.status == -1 + +- name: Testing use_proxy=no is honored + environment: + https_proxy: 'https://localhost:3456' + uri: + url: 'https://httpbin.org/get' + use_proxy: no + # Ubuntu12.04 doesn't have python-urllib3, this makes handling required dependencies a pain across all variations # We'll use this to just skip 12.04 on those tests. We should be sufficiently covered with other OSes and versions - name: Set fact if running on Ubuntu 12.04 |