diff options
| author | James O'Doherty <james@theodohertyfamily.com> | 2026-06-04 22:57:35 -0400 |
|---|---|---|
| committer | James O'Doherty <james@theodohertyfamily.com> | 2026-06-04 22:57:35 -0400 |
| commit | 04dca5dada8c2d971ff3b54eeedc5ab6e53a29ac (patch) | |
| tree | a9890073a0eb21bc7db3aef2fcbe66cdc2fc9ceb /tests/e2e/network_change_test.go | |
| parent | 66b782e261f1cd928ad6a8482788a65fb484db45 (diff) | |
refactor: decouple namespace operations and improve test coverage
- Introduce `namespace.Ops` interface to decouple `Manager` from system-level namespace operations, enabling easier unit testing via mocks.
- Add unit tests for `internal/paths` to verify path resolution logic across different environment configurations.
- Implement `EnsureBinary` helper in E2E tests to gracefully skip tests when `WG_WRAP_BIN` is not set, allowing `go test ./...` to pass in non-build environments.
- Apply project-wide formatting and fix linting issues.
Diffstat (limited to 'tests/e2e/network_change_test.go')
| -rw-r--r-- | tests/e2e/network_change_test.go | 5 |
1 files changed, 1 insertions, 4 deletions
diff --git a/tests/e2e/network_change_test.go b/tests/e2e/network_change_test.go index fb75e02..f1ca215 100644 --- a/tests/e2e/network_change_test.go +++ b/tests/e2e/network_change_test.go @@ -14,10 +14,7 @@ import ( // Since we can't easily toggle physical hardware in CI, we verify that the // userspace WireGuard engine can handle connectivity interruptions. func TestHostNetworkChange(t *testing.T) { - binaryPath, err := GetBinaryPath() - if err != nil { - t.Skipf("Skipping test: %v", err) - } + binaryPath := EnsureBinary(t) tmpRuntimeDir := t.TempDir() tmpConfigDir := t.TempDir() |
