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

Function TestHandlerManagerStepNoScriptsEnvVar

pkg/workflow/safe_scripts_test.go:319–332  ·  view source on GitHub ↗

TestHandlerManagerStepNoScriptsEnvVar verifies GH_AW_SAFE_OUTPUT_SCRIPTS absent when no scripts

(t *testing.T)

Source from the content-addressed store, hash-verified

317
318// TestHandlerManagerStepNoScriptsEnvVar verifies GH_AW_SAFE_OUTPUT_SCRIPTS absent when no scripts
319func 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
335func TestSafeOutputsConfigIncludesScripts(t *testing.T) {

Callers

nothing calls this directly

Calls 2

NewCompilerFunction · 0.85

Tested by

no test coverage detected