diff options
author | Edward Thomson <ethomson@edwardthomson.com> | 2021-09-20 12:19:48 -0400 |
---|---|---|
committer | Edward Thomson <ethomson@edwardthomson.com> | 2021-09-20 12:19:48 -0400 |
commit | bfdba8ee938f05248879491a5c43083f1b25a79f (patch) | |
tree | c782f87de68b825498b8eda1e619b308979c7815 | |
parent | d60872f6816f11e1007d42c0b99282684bb40346 (diff) | |
parent | 8e7621241d7246a5cf516df296bc85f3164efbf9 (diff) | |
download | libgit2-bfdba8ee938f05248879491a5c43083f1b25a79f.tar.gz |
Merge branch 'sathieu/patch-1' into main
-rw-r--r-- | tests/remote/httpproxy.c | 9 |
1 files changed, 9 insertions, 0 deletions
diff --git a/tests/remote/httpproxy.c b/tests/remote/httpproxy.c index 182ea2467..8cd4371f5 100644 --- a/tests/remote/httpproxy.c +++ b/tests/remote/httpproxy.c @@ -152,6 +152,11 @@ void test_remote_httpproxy__env(void) orig_no_proxy = cl_getenv("NO_PROXY"); orig_proxies_need_reset = 1; + /* Clear everything for a fresh start */ + cl_setenv("HTTP_PROXY", NULL); + cl_setenv("HTTPS_PROXY", NULL); + cl_setenv("NO_PROXY", NULL); + /* HTTP proxy is ignored for HTTPS */ cl_setenv("HTTP_PROXY", "http://localhost:9/"); assert_proxy_is(NULL); @@ -173,7 +178,11 @@ void test_remote_httpproxy__env(void) cl_setenv("NO_PROXY", "github.dev,github.com,github.foo"); assert_proxy_is(NULL); + cl_setenv("HTTPS_PROXY", ""); + assert_proxy_is(NULL); + /* configuration overrides environment variables */ + cl_setenv("HTTPS_PROXY", "http://localhost:10/"); cl_setenv("NO_PROXY", "github.none"); assert_config_match("http.https://github.com.proxy", "http://localhost:11/"); } |