MCPcopy Create free account
hub / github.com/github/gh-aw / TestGetGlobalEngineRegistry

Function TestGetGlobalEngineRegistry

pkg/workflow/agentic_engine_test.go:132–152  ·  view source on GitHub ↗
(t *testing.T)

Source from the content-addressed store, hash-verified

130func (e *negativePortEngine) getDedicatedLLMGatewayPort() int { return -1 }
131
132func 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
154func TestEngineRegistry_GetAllAgentManifestFolders(t *testing.T) {
155 t.Run("always includes .agents platform directory", func(t *testing.T) {

Callers

nothing calls this directly

Calls 3

GetGlobalEngineRegistryFunction · 0.85
GetSupportedEnginesMethod · 0.80
RunMethod · 0.45

Tested by

no test coverage detected