File tree Expand file tree Collapse file tree 1 file changed +9
-4
lines changed
Expand file tree Collapse file tree 1 file changed +9
-4
lines changed Original file line number Diff line number Diff line change @@ -112,6 +112,11 @@ void test_remote_httpproxy__env(void)
112112 orig_no_proxy = cl_getenv ("NO_PROXY" );
113113 orig_proxies_need_reset = 1 ;
114114
115+ /* Clear everything for a fresh start */
116+ cl_setenv ("HTTP_PROXY" , NULL );
117+ cl_setenv ("HTTPS_PROXY" , NULL );
118+ cl_setenv ("NO_PROXY" , NULL );
119+
115120 /* HTTP proxy is ignored for HTTPS */
116121 cl_setenv ("HTTP_PROXY" , "http://localhost:9/" );
117122 assert_proxy_is (NULL );
@@ -133,11 +138,11 @@ void test_remote_httpproxy__env(void)
133138 cl_setenv ("NO_PROXY" , "github.dev,github.com,github.foo" );
134139 assert_proxy_is (NULL );
135140
141+ cl_setenv ("HTTPS_PROXY" , "" );
142+ assert_proxy_is (NULL );
143+
136144 /* configuration overrides environment variables */
145+ cl_setenv ("HTTPS_PROXY" , "http://localhost:10/" );
137146 cl_setenv ("NO_PROXY" , "github.none" );
138147 assert_config_match ("http.https://github.com.proxy" , "http://localhost:11/" );
139-
140- /* empty env behaves like unset env */
141- cl_setenv ("HTTPS_PROXY" , "" );
142- assert_proxy_is (NULL );
143148}
You can’t perform that action at this time.
0 commit comments