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

Function TestClaudeEngineWithOutput

pkg/workflow/claude_engine_test.go:154–175  ·  view source on GitHub ↗
(t *testing.T)

Source from the content-addressed store, hash-verified

152}
153
154func TestClaudeEngineWithOutput(t *testing.T) {
155 engine := NewClaudeEngine()
156
157 // Test execution steps with hasOutput=true
158 workflowData := &WorkflowData{
159 Name: "test-workflow",
160 SafeOutputs: &SafeOutputsConfig{}, // non-nil means hasOutput=true
161 }
162 steps := engine.GetExecutionSteps(workflowData, "test-log")
163 if len(steps) != 1 {
164 t.Fatalf("Expected 1 step (execution), got %d", len(steps))
165 }
166
167 // Check the main execution step
168 executionStep := steps[0]
169 stepContent := strings.Join([]string(executionStep), "\n")
170
171 // Should include GH_AW_SAFE_OUTPUTS when hasOutput=true in environment section (via step output)
172 if !strings.Contains(stepContent, "GH_AW_SAFE_OUTPUTS: ${{ steps.set-runtime-paths.outputs.GH_AW_SAFE_OUTPUTS }}") {
173 t.Errorf("Expected GH_AW_SAFE_OUTPUTS in env section when hasOutput=true in step content:\n%s", stepContent)
174 }
175}
176
177func TestClaudeEngineLLMProviderGitHubUsesCopilotCredentials(t *testing.T) {
178 engine := NewClaudeEngine()

Callers

nothing calls this directly

Calls 3

GetExecutionStepsMethod · 0.95
NewClaudeEngineFunction · 0.85
ErrorfMethod · 0.45

Tested by

no test coverage detected