diff --git a/cmd/gh-aw/main_entry_test.go b/cmd/gh-aw/main_entry_test.go index e5b9fee45f8..dc075cdcf12 100644 --- a/cmd/gh-aw/main_entry_test.go +++ b/cmd/gh-aw/main_entry_test.go @@ -33,6 +33,11 @@ func TestValidateEngine(t *testing.T) { engine: "codex", expectErr: false, }, + { + name: "valid copilot engine", + engine: "copilot", + expectErr: false, + }, { name: "invalid engine", engine: "gpt4", @@ -75,7 +80,7 @@ func TestValidateEngine(t *testing.T) { return } - if tt.errMessage != "" && err.Error() != fmt.Sprintf("invalid engine value '%s'. Must be 'claude' or 'codex'", tt.engine) { + if tt.errMessage != "" && err.Error() != fmt.Sprintf("invalid engine value '%s'. Must be 'copilot', 'claude' or 'codex'", tt.engine) { t.Errorf("validateEngine(%q) error message = %v, want to contain %v", tt.engine, err.Error(), tt.errMessage) } } else { diff --git a/pkg/parser/schema_test.go b/pkg/parser/schema_test.go index d6b6a5230ea..54339467cbd 100644 --- a/pkg/parser/schema_test.go +++ b/pkg/parser/schema_test.go @@ -116,7 +116,7 @@ func TestValidateMainWorkflowFrontmatterWithSchema(t *testing.T) { "engine": "invalid-engine", }, wantErr: true, - errContains: "value must be one of 'claude', 'codex'", + errContains: "value must be one of 'copilot', 'claude', 'codex', 'custom'", }, { name: "invalid engine object format - invalid id", @@ -127,7 +127,7 @@ func TestValidateMainWorkflowFrontmatterWithSchema(t *testing.T) { }, }, wantErr: true, - errContains: "value must be one of 'claude', 'codex'", + errContains: "value must be one of 'claude', 'codex', 'custom'", }, { name: "invalid engine object format - missing id", diff --git a/pkg/workflow/agentic_engine_test.go b/pkg/workflow/agentic_engine_test.go index 4ec48c7e333..b754a8196a6 100644 --- a/pkg/workflow/agentic_engine_test.go +++ b/pkg/workflow/agentic_engine_test.go @@ -9,8 +9,8 @@ func TestEngineRegistry(t *testing.T) { // Test that built-in engines are registered supportedEngines := registry.GetSupportedEngines() - if len(supportedEngines) != 3 { - t.Errorf("Expected 3 supported engines, got %d", len(supportedEngines)) + if len(supportedEngines) != 4 { + t.Errorf("Expected 4 supported engines, got %d", len(supportedEngines)) } // Test getting engines by ID @@ -116,7 +116,7 @@ func TestEngineRegistryCustomEngine(t *testing.T) { // Test that supported engines list is updated supportedEngines := registry.GetSupportedEngines() - if len(supportedEngines) != 4 { - t.Errorf("Expected 4 supported engines after adding test-custom, got %d", len(supportedEngines)) + if len(supportedEngines) != 5 { + t.Errorf("Expected 5 supported engines after adding test-custom, got %d", len(supportedEngines)) } }