TestHandlerManagerStepNoScriptsEnvVar verifies GH_AW_SAFE_OUTPUT_SCRIPTS absent when no scripts
(t *testing.T)
| 317 | |
| 318 | // TestHandlerManagerStepNoScriptsEnvVar verifies GH_AW_SAFE_OUTPUT_SCRIPTS absent when no scripts |
| 319 | func TestHandlerManagerStepNoScriptsEnvVar(t *testing.T) { |
| 320 | compiler := NewCompiler() |
| 321 | workflowData := &WorkflowData{ |
| 322 | SafeOutputs: &SafeOutputsConfig{ |
| 323 | CreateIssues: &CreateIssuesConfig{}, |
| 324 | }, |
| 325 | } |
| 326 | |
| 327 | steps, err := compiler.buildHandlerManagerStep(workflowData) |
| 328 | require.NoError(t, err) |
| 329 | fullYAML := strings.Join(steps, "") |
| 330 | |
| 331 | assert.NotContains(t, fullYAML, "GH_AW_SAFE_OUTPUT_SCRIPTS", "Should not include GH_AW_SAFE_OUTPUT_SCRIPTS env var when no scripts") |
| 332 | } |
| 333 | |
| 334 | // TestSafeOutputsConfigIncludesScripts verifies extractSafeOutputsConfig handles scripts |
| 335 | func TestSafeOutputsConfigIncludesScripts(t *testing.T) { |
nothing calls this directly
no test coverage detected