(t *testing.T)
| 152 | } |
| 153 | |
| 154 | func 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 | |
| 177 | func TestClaudeEngineLLMProviderGitHubUsesCopilotCredentials(t *testing.T) { |
| 178 | engine := NewClaudeEngine() |
nothing calls this directly
no test coverage detected