[glib-networking] Proxy tests should unset proxy environment variables



commit b0caa21faaca574b55ae61291291be57a59ff28a
Author: Michael Catanzaro <mcatanzaro redhat com>
Date:   Fri Feb 25 10:57:20 2022 -0600

    Proxy tests should unset proxy environment variables
    
    Otherwise, environment variable proxy configuration of the test runner
    could mess up our test.

 proxy/tests/environment.c | 10 ++++++++++
 1 file changed, 10 insertions(+)
---
diff --git a/proxy/tests/environment.c b/proxy/tests/environment.c
index 2d9d026c..79c1e4e9 100644
--- a/proxy/tests/environment.c
+++ b/proxy/tests/environment.c
@@ -95,6 +95,16 @@ main (int   argc,
    * it might possibly look at in the future. Just covering our bases. */
   g_unsetenv ("XDG_CURRENT_DESKTOP");
 
+  /* Unset static proxy settings */
+  g_unsetenv ("http_proxy");
+  g_unsetenv ("HTTP_PROXY");
+  g_unsetenv ("https_proxy");
+  g_unsetenv ("HTTPS_PROXY");
+  g_unsetenv ("ftp_proxy");
+  g_unsetenv ("FTP_PROXY");
+  g_unsetenv ("no_proxy");
+  g_unsetenv ("NO_PROXY");
+
   g_test_init (&argc, &argv, NULL);
 
   g_test_add_func ("/proxy/environment/uri", test_proxy_uri);


[Date Prev][Date Next]   [Thread Prev][Thread Next]   [Thread Index] [Date Index] [Author Index]