diff options
| author | James O'Doherty <james@theodohertyfamily.com> | 2026-06-04 00:21:56 -0400 |
|---|---|---|
| committer | James O'Doherty <james@theodohertyfamily.com> | 2026-06-04 00:21:56 -0400 |
| commit | c53503b52b6fc6de37b6053719521054003fa50b (patch) | |
| tree | aaa6f3ff912365676261a48c39d325023d0a9c38 /internal/namespace/lifecycle_test.go | |
| parent | 51a0845adba702ac02437405988b24b3b2c9fb45 (diff) | |
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.
Diffstat (limited to 'internal/namespace/lifecycle_test.go')
| -rw-r--r-- | internal/namespace/lifecycle_test.go | 6 |
1 files changed, 3 insertions, 3 deletions
diff --git a/internal/namespace/lifecycle_test.go b/internal/namespace/lifecycle_test.go index 9962e14..3e01ea9 100644 --- a/internal/namespace/lifecycle_test.go +++ b/internal/namespace/lifecycle_test.go @@ -87,7 +87,7 @@ func TestLifecycleReferenceCounting(t *testing.T) { if err := RegisterProcess(pm, profile); err != nil { t.Fatal(err) } - + // Simulate the application flow: Unregister before checking if we are the last one if err := UnregisterProcess(pm, profile); err != nil { t.Fatal(err) @@ -102,12 +102,12 @@ func TestLifecycleReferenceCounting(t *testing.T) { if err := os.WriteFile(filepath.Join(pidsDir, "1234567"), []byte(""), 0644); err != nil { t.Fatal(err) } - + // Register a real process so that pruning has something to do if err := RegisterProcess(pm, profile); err != nil { t.Fatal(err) } - + // Prune the stale one if err := PruneStalePids(pm, profile); err != nil { t.Fatal(err) |
