File tree Expand file tree Collapse file tree 1 file changed +9
-0
lines changed
Expand file tree Collapse file tree 1 file changed +9
-0
lines changed Original file line number Diff line number Diff 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}
You can’t perform that action at this time.
0 commit comments