(t *testing.T)
| 130 | func (e *negativePortEngine) getDedicatedLLMGatewayPort() int { return -1 } |
| 131 | |
| 132 | func TestGetGlobalEngineRegistry(t *testing.T) { |
| 133 | t.Run("returns non-nil registry", func(t *testing.T) { |
| 134 | registry := GetGlobalEngineRegistry() |
| 135 | require.NotNil(t, registry, "global engine registry should not be nil") |
| 136 | }) |
| 137 | |
| 138 | t.Run("returns same singleton on repeated calls", func(t *testing.T) { |
| 139 | registry1 := GetGlobalEngineRegistry() |
| 140 | registry2 := GetGlobalEngineRegistry() |
| 141 | assert.Same(t, registry1, registry2, "GetGlobalEngineRegistry should return the same singleton instance") |
| 142 | }) |
| 143 | |
| 144 | t.Run("singleton contains expected built-in engines", func(t *testing.T) { |
| 145 | registry := GetGlobalEngineRegistry() |
| 146 | expectedEngineIDs := []string{"claude", "codex", "copilot", "gemini", "opencode", "crush"} |
| 147 | supportedEngines := registry.GetSupportedEngines() |
| 148 | for _, engineID := range expectedEngineIDs { |
| 149 | assert.True(t, slices.Contains(supportedEngines, engineID), "global registry should contain built-in engine %q", engineID) |
| 150 | } |
| 151 | }) |
| 152 | } |
| 153 | |
| 154 | func TestEngineRegistry_GetAllAgentManifestFolders(t *testing.T) { |
| 155 | t.Run("always includes .agents platform directory", func(t *testing.T) { |
nothing calls this directly
no test coverage detected