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

Function TestPiEngine_GetExecutionSteps_Basic

pkg/workflow/pi_engine_test.go:178–197  ·  view source on GitHub ↗
(t *testing.T)

Source from the content-addressed store, hash-verified

176}
177
178func TestPiEngine_GetExecutionSteps_Basic(t *testing.T) {
179 engine := NewPiEngine()
180 workflowData := &WorkflowData{
181 Name: "test-workflow",
182 EngineConfig: &EngineConfig{ID: "pi"},
183 ParsedTools: NewTools(map[string]any{}),
184 }
185 steps := engine.GetExecutionSteps(workflowData, "/tmp/gh-aw/agent-stdio.log")
186 require.Len(t, steps, 1, "Should produce exactly one execution step")
187
188 stepText := strings.Join(steps[0], "\n")
189 assert.Contains(t, stepText, "Execute Pi CLI", "Step should be named 'Execute Pi CLI'")
190 assert.Contains(t, stepText, "--print", "Step should use --print flag (non-interactive mode)")
191 assert.Contains(t, stepText, "--mode json", "Step should use --mode json for structured JSONL output")
192 assert.NotContains(t, stepText, "pi run", "Step should not use the removed 'pi run' subcommand")
193 assert.NotContains(t, stepText, "--json-log", "Step should not use the removed --json-log flag")
194 assert.Contains(t, stepText, "agentic_execution", "Step should have agentic_execution id")
195 assert.Contains(t, stepText, "pi_provider.cjs", "Step should load the provider extension")
196 assert.Contains(t, stepText, "pi_steering_extension.cjs", "Step should automatically load the steering extension")
197}
198
199func TestPiEngine_GetExecutionSteps_WithModel(t *testing.T) {
200 engine := NewPiEngine()

Callers

nothing calls this directly

Calls 3

GetExecutionStepsMethod · 0.95
NewPiEngineFunction · 0.85
NewToolsFunction · 0.85

Tested by

no test coverage detected