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

Function TestSpec_Engine_DocumentedEnginesRegistered

pkg/workflow/spec_test.go:278–296  ·  view source on GitHub ↗

TestSpec_Engine_DocumentedEnginesRegistered validates that every AI engine documented in the workflow package README.md is registered and reports the documented identity. Spec: the engine architecture lists copilot, claude, codex, gemini, crush, opencode, pi, and antigravity engines, each created by

(t *testing.T)

Source from the content-addressed store, hash-verified

276// Spec: the engine architecture lists copilot, claude, codex, gemini, crush, opencode,
277// pi, and antigravity engines, each created by a New<Name>Engine constructor.
278func TestSpec_Engine_DocumentedEnginesRegistered(t *testing.T) {
279 registry := workflow.GetGlobalEngineRegistry()
280 require.NotNil(t, registry, "GetGlobalEngineRegistry() must return a non-nil registry")
281
282 documentedEngines := []string{
283 "copilot", "claude", "codex", "gemini",
284 "crush", "opencode", "pi", "antigravity",
285 }
286
287 for _, id := range documentedEngines {
288 t.Run(id, func(t *testing.T) {
289 engine, err := registry.GetEngine(id)
290 require.NoError(t, err, "documented engine %q must be registered", id)
291 require.NotNil(t, engine, "documented engine %q must be non-nil", id)
292 assert.Equal(t, id, engine.GetID(),
293 "engine %q must report its documented ID via GetID()", id)
294 })
295 }
296}
297
298// TestSpec_Engine_GlobalRegistrySingleton validates the documented thread-safety contract that
299// GetGlobalEngineRegistry returns a singleton initialized once at startup.

Callers

nothing calls this directly

Calls 4

GetGlobalEngineRegistryFunction · 0.92
GetEngineMethod · 0.80
GetIDMethod · 0.65
RunMethod · 0.45

Tested by

no test coverage detected