diff options
| author | James O'Doherty <james@theodohertyfamily.com> | 2026-05-22 16:17:55 -0400 |
|---|---|---|
| committer | James O'Doherty <james@theodohertyfamily.com> | 2026-05-22 16:17:55 -0400 |
| commit | 135f6edbd9389bc4783f13c26aed0a74d3c8aca0 (patch) | |
| tree | 41a8e80b0dcf2c42b045bc91d9101deceb049f47 /tests/e2e/lifecycle_test.go | |
| parent | 2e3a1d07b43e6e942e51ba263c6fcdc2351afc0d (diff) | |
refactor: unify path management and complete profile management system
- Create internal/paths package for unified config and runtime directory resolution
- Implement robust WireGuard config parsing in pkg/wgconf
- Implement profile management subcommands: list, import, configure, delete, stop
- Fix namespace pinning path collisions (separating .ns files from pids directories)
- Implement and verify namespace unpinning logic
- Fix linting errors and improve error handling across the project
Diffstat (limited to 'tests/e2e/lifecycle_test.go')
| -rw-r--r-- | tests/e2e/lifecycle_test.go | 10 |
1 files changed, 6 insertions, 4 deletions
diff --git a/tests/e2e/lifecycle_test.go b/tests/e2e/lifecycle_test.go index 649dbc0..08887e1 100644 --- a/tests/e2e/lifecycle_test.go +++ b/tests/e2e/lifecycle_test.go @@ -48,9 +48,11 @@ func TestNamespaceLifecycleAutomation(t *testing.T) { tmpRuntimeDir := t.TempDir() profile := "e2e-lifecycle-test" pidsDir := filepath.Join(tmpRuntimeDir, "profiles", profile, "pids") - + // Clean up before starting - os.RemoveAll(filepath.Join(tmpRuntimeDir, "profiles", profile)) + if err := os.RemoveAll(filepath.Join(tmpRuntimeDir, "profiles", profile)); err != nil { + t.Fatalf("failed to remove profile directory: %v", err) + } t.Run("ReferenceCounting", func(t *testing.T) { // Start a process that exits quickly @@ -75,7 +77,7 @@ func TestNamespaceLifecycleAutomation(t *testing.T) { if err := cmd1.Wait(); err != nil { t.Fatalf("cmd1 failed: %v", err) } - + // Poll for the count to drop back to 1 timeout := time.After(2 * time.Second) found := false @@ -97,7 +99,7 @@ func TestNamespaceLifecycleAutomation(t *testing.T) { if err := cmd2.Wait(); err != nil { t.Fatalf("cmd2 failed: %v", err) } - + // Verify a clean state (expect 0 files) timeout = time.After(2 * time.Second) found = false |
