(t *testing.T)
| 80 | } |
| 81 | |
| 82 | func TestManagerUnregister(t *testing.T) { |
| 83 | tmpDir := t.TempDir() |
| 84 | prdPath := createTestPRDWithName(t, tmpDir, "test-prd") |
| 85 | |
| 86 | m := NewManager(10, testProvider) |
| 87 | m.Register("test-prd", prdPath) |
| 88 | |
| 89 | // Unregister |
| 90 | err := m.Unregister("test-prd") |
| 91 | if err != nil { |
| 92 | t.Fatalf("unexpected error: %v", err) |
| 93 | } |
| 94 | |
| 95 | // Verify it was removed |
| 96 | instance := m.GetInstance("test-prd") |
| 97 | if instance != nil { |
| 98 | t.Error("expected instance to be removed") |
| 99 | } |
| 100 | |
| 101 | // Try to unregister non-existent - should error |
| 102 | err = m.Unregister("non-existent") |
| 103 | if err == nil { |
| 104 | t.Error("expected error when unregistering non-existent PRD") |
| 105 | } |
| 106 | } |
| 107 | |
| 108 | func TestManagerGetState(t *testing.T) { |
| 109 | tmpDir := t.TempDir() |
nothing calls this directly
no test coverage detected