Skip to content

Commit bfdba8e

Browse files
committed
Merge branch 'sathieu/patch-1' into main
2 parents d60872f + 8e76212 commit bfdba8e

File tree

1 file changed

+9
-0
lines changed

1 file changed

+9
-0
lines changed

tests/remote/httpproxy.c

Lines changed: 9 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -152,6 +152,11 @@ void test_remote_httpproxy__env(void)
152152
orig_no_proxy = cl_getenv("NO_PROXY");
153153
orig_proxies_need_reset = 1;
154154

155+
/* Clear everything for a fresh start */
156+
cl_setenv("HTTP_PROXY", NULL);
157+
cl_setenv("HTTPS_PROXY", NULL);
158+
cl_setenv("NO_PROXY", NULL);
159+
155160
/* HTTP proxy is ignored for HTTPS */
156161
cl_setenv("HTTP_PROXY", "http://localhost:9/");
157162
assert_proxy_is(NULL);
@@ -173,7 +178,11 @@ void test_remote_httpproxy__env(void)
173178
cl_setenv("NO_PROXY", "github.dev,github.com,github.foo");
174179
assert_proxy_is(NULL);
175180

181+
cl_setenv("HTTPS_PROXY", "");
182+
assert_proxy_is(NULL);
183+
176184
/* configuration overrides environment variables */
185+
cl_setenv("HTTPS_PROXY", "http://localhost:10/");
177186
cl_setenv("NO_PROXY", "github.none");
178187
assert_config_match("http.https://github.com.proxy", "http://localhost:11/");
179188
}

0 commit comments

Comments
 (0)