diff options
author | Nicolas Karolak <nikaro@users.noreply.github.com> | 2022-08-03 18:56:22 +0200 |
---|---|---|
committer | GitHub <noreply@github.com> | 2022-08-03 09:56:22 -0700 |
commit | bf1e031eb23256ffedddeba17cb3afa11476a6ae (patch) | |
tree | 83c7c67dfd2126c370dfdadf71a2ea5bead3d61a /test | |
parent | fc82d215a67fed191d0320cbd1a55b4ac369116c (diff) | |
download | ansible-bf1e031eb23256ffedddeba17cb3afa11476a6ae.tar.gz |
honor use_proxy parameter (#77312) (#78261)
* 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>
(cherry picked from commit 1d9c68d27e10b6023d294d48e873ba4cdde46bbb)
Co-authored-by: h4rr21 <juankchess13@hotmail.com>
Diffstat (limited to 'test')
-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 |