mirror of
https://github.com/MHSanaei/3x-ui.git
synced 2026-11-03 03:35:04 +03:00
fix(panel): skip the proxy env forwarding test on Windows
Windows env var names are case-insensitive, so https_proxy and HTTPS_PROXY resolve to the same variable there and updateProxyEnvVars forwards it under both names. The helper only runs on Linux - startUpdate refuses every other platform - so the test's case-sensitive expectations only hold, and only matter, on Linux.
This commit is contained in:
@@ -54,6 +54,9 @@ func TestShellQuote(t *testing.T) {
|
|||||||
// TestUpdateProxyEnvVars covers the bug this function fixes: ambient proxy
|
// TestUpdateProxyEnvVars covers the bug this function fixes: ambient proxy
|
||||||
// vars must reach update.sh's systemd-run child, which inherits nothing.
|
// vars must reach update.sh's systemd-run child, which inherits nothing.
|
||||||
func TestUpdateProxyEnvVars(t *testing.T) {
|
func TestUpdateProxyEnvVars(t *testing.T) {
|
||||||
|
if runtime.GOOS == "windows" {
|
||||||
|
t.Skip("Windows env var names are case-insensitive, so both spellings resolve; the updater runs only on Linux")
|
||||||
|
}
|
||||||
allKeys := []string{"https_proxy", "HTTPS_PROXY", "all_proxy", "ALL_PROXY", "http_proxy", "HTTP_PROXY", "no_proxy", "NO_PROXY"}
|
allKeys := []string{"https_proxy", "HTTPS_PROXY", "all_proxy", "ALL_PROXY", "http_proxy", "HTTP_PROXY", "no_proxy", "NO_PROXY"}
|
||||||
clearAll := func(t *testing.T) {
|
clearAll := func(t *testing.T) {
|
||||||
t.Helper()
|
t.Helper()
|
||||||
|
|||||||
Reference in New Issue
Block a user