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

Function TestCopilotEngine

pkg/workflow/copilot_engine_test.go:25–60  ·  view source on GitHub ↗
(t *testing.T)

Source from the content-addressed store, hash-verified

23}
24
25func TestCopilotEngine(t *testing.T) {
26 engine := NewCopilotEngine()
27
28 // Test basic properties
29 if engine.GetID() != "copilot" {
30 t.Errorf("Expected copilot engine ID, got '%s'", engine.GetID())
31 }
32
33 if engine.GetDisplayName() != "GitHub Copilot CLI" {
34 t.Errorf("Expected 'GitHub Copilot CLI' display name, got '%s'", engine.GetDisplayName())
35 }
36
37 if engine.IsExperimental() {
38 t.Error("Expected copilot engine to not be experimental")
39 }
40
41 capabilities := engine.GetCapabilities()
42
43 if !capabilities.ToolsAllowlist {
44 t.Error("Expected copilot engine to support tools allowlist")
45 }
46
47 if !capabilities.MaxTurns {
48 t.Error("Expected copilot engine to support max-turns")
49 }
50
51 // Test declared output files (session files are copied to logs folder)
52 outputFiles := engine.GetDeclaredOutputFiles()
53 if len(outputFiles) != 1 {
54 t.Errorf("Expected 1 declared output file, got %d", len(outputFiles))
55 }
56
57 if outputFiles[0] != "/tmp/gh-aw/sandbox/agent/logs/" {
58 t.Errorf("Expected declared output file to be logs folder, got %s", outputFiles[0])
59 }
60}
61
62func TestCopilotEngineDefaultDetectionModel(t *testing.T) {
63 engine := NewCopilotEngine()

Callers

nothing calls this directly

Calls 8

NewCopilotEngineFunction · 0.85
GetIDMethod · 0.65
GetDisplayNameMethod · 0.65
IsExperimentalMethod · 0.65
GetCapabilitiesMethod · 0.65
ErrorfMethod · 0.45
ErrorMethod · 0.45

Tested by

no test coverage detected