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

Function TestNilEngineConfig

pkg/workflow/engine_config_test.go:885–910  ·  view source on GitHub ↗
(t *testing.T)

Source from the content-addressed store, hash-verified

883}
884
885func TestNilEngineConfig(t *testing.T) {
886 engines := []CodingAgentEngine{
887 NewClaudeEngine(),
888 NewCodexEngine(),
889 }
890
891 for _, engine := range engines {
892 t.Run(engine.GetID(), func(t *testing.T) {
893 // Should not panic when engineConfig is nil
894 workflowData := &WorkflowData{
895 Name: "test-workflow",
896 }
897 steps := engine.GetExecutionSteps(workflowData, "test-log")
898
899 // Engines should return at least one step
900 if len(steps) == 0 {
901 t.Errorf("Expected at least one step for engine %s, got none", engine.GetID())
902 }
903
904 // Check that the first step has some content
905 if len(steps) > 0 && len(steps[0]) == 0 {
906 t.Errorf("Expected non-empty step content for engine %s", engine.GetID())
907 }
908 })
909 }
910}
911
912func TestEngineBareFieldExtraction(t *testing.T) {
913 compiler := NewCompiler()

Callers

nothing calls this directly

Calls 6

NewClaudeEngineFunction · 0.85
NewCodexEngineFunction · 0.85
GetIDMethod · 0.65
GetExecutionStepsMethod · 0.65
RunMethod · 0.45
ErrorfMethod · 0.45

Tested by

no test coverage detected