summaryrefslogtreecommitdiff
path: root/internal/cli/cli.go
diff options
context:
space:
mode:
authorJames O'Doherty <james@theodohertyfamily.com>2026-06-04 22:57:35 -0400
committerJames O'Doherty <james@theodohertyfamily.com>2026-06-04 22:57:35 -0400
commit04dca5dada8c2d971ff3b54eeedc5ab6e53a29ac (patch)
treea9890073a0eb21bc7db3aef2fcbe66cdc2fc9ceb /internal/cli/cli.go
parent66b782e261f1cd928ad6a8482788a65fb484db45 (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 'internal/cli/cli.go')
-rw-r--r--internal/cli/cli.go2
1 files changed, 1 insertions, 1 deletions
diff --git a/internal/cli/cli.go b/internal/cli/cli.go
index 1873e28..9041670 100644
--- a/internal/cli/cli.go
+++ b/internal/cli/cli.go
@@ -32,7 +32,7 @@ func NewApp(args []string) *App {
func (a *App) getManager() *manager.Manager {
if a.mgr == nil {
- a.mgr = manager.New(a.getPathManager())
+ a.mgr = manager.New(a.getPathManager(), namespace.NewLinuxOps())
}
return a.mgr
}