From c53503b52b6fc6de37b6053719521054003fa50b Mon Sep 17 00:00:00 2001 From: James O'Doherty Date: Thu, 4 Jun 2026 00:21:56 -0400 Subject: clean up debugging prints and silence successful execution output - Remove leftover DEBUG prints from CLI and wireguard internal packages. - Silence stdout during successful command wrapping to ensure only the wrapped command's output is visible. - Redirect all warnings and internal errors to stderr. - Implement a verbose mode via `WG_WRAP_VERBOSE=1` to enable tunnel status messages. - Update E2E tests to use verbose mode for verification of tunnel lifecycle events. - Fix errcheck linting issue in wireguard.go and apply go fmt. --- tests/e2e/config_hotswap_test.go | 2 ++ tests/e2e/crash_recovery_test.go | 1 + tests/e2e/network_change_test.go | 1 + 3 files changed, 4 insertions(+) (limited to 'tests/e2e') diff --git a/tests/e2e/config_hotswap_test.go b/tests/e2e/config_hotswap_test.go index b4a7ca5..a962b97 100644 --- a/tests/e2e/config_hotswap_test.go +++ b/tests/e2e/config_hotswap_test.go @@ -46,6 +46,7 @@ Endpoint = 1.1.1.1:51820 cmdA.Env = append(os.Environ(), fmt.Sprintf("XDG_RUNTIME_DIR=%s", tmpRuntimeDir), fmt.Sprintf("XDG_CONFIG_HOME=%s", tmpConfigDir), + "WG_WRAP_VERBOSE=1", ) if err := cmdA.Start(); err != nil { t.Fatalf("Failed to start Process A: %v", err) @@ -74,6 +75,7 @@ Endpoint = 8.8.8.8:51820 cmdB.Env = append(os.Environ(), fmt.Sprintf("XDG_RUNTIME_DIR=%s", tmpRuntimeDir), fmt.Sprintf("XDG_CONFIG_HOME=%s", tmpConfigDir), + "WG_WRAP_VERBOSE=1", ) out, err := cmdB.CombinedOutput() diff --git a/tests/e2e/crash_recovery_test.go b/tests/e2e/crash_recovery_test.go index 618417d..669f25f 100644 --- a/tests/e2e/crash_recovery_test.go +++ b/tests/e2e/crash_recovery_test.go @@ -67,6 +67,7 @@ Endpoint = 1.1.1.1:51820 cmd.Env = append(os.Environ(), fmt.Sprintf("XDG_RUNTIME_DIR=%s", tmpRuntimeDir), fmt.Sprintf("XDG_CONFIG_HOME=%s", tmpConfigDir), + "WG_WRAP_VERBOSE=1", ) out, err := cmd.CombinedOutput() diff --git a/tests/e2e/network_change_test.go b/tests/e2e/network_change_test.go index f429773..fb75e02 100644 --- a/tests/e2e/network_change_test.go +++ b/tests/e2e/network_change_test.go @@ -64,6 +64,7 @@ Endpoint = 1.1.1.1:51820 cmdJoin.Env = append(os.Environ(), fmt.Sprintf("XDG_RUNTIME_DIR=%s", tmpRuntimeDir), fmt.Sprintf("XDG_CONFIG_HOME=%s", tmpConfigDir), + "WG_WRAP_VERBOSE=1", ) out, err := cmdJoin.CombinedOutput() -- cgit v1.2.3