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

Function TestConclusionJobNoPushRepoMemoryResult

pkg/workflow/notify_comment_test.go:1066–1087  ·  view source on GitHub ↗

TestConclusionJobNoPushRepoMemoryResult verifies that when repo-memory is NOT configured, GH_AW_PUSH_REPO_MEMORY_RESULT is not added to the conclusion job (no unnecessary env vars).

(t *testing.T)

Source from the content-addressed store, hash-verified

1064// TestConclusionJobNoPushRepoMemoryResult verifies that when repo-memory is NOT configured,
1065// GH_AW_PUSH_REPO_MEMORY_RESULT is not added to the conclusion job (no unnecessary env vars).
1066func TestConclusionJobNoPushRepoMemoryResult(t *testing.T) {
1067 compiler := NewCompiler()
1068 workflowData := &WorkflowData{
1069 Name: "Test Workflow",
1070 SafeOutputs: &SafeOutputsConfig{
1071 MissingTool: &MissingToolConfig{},
1072 },
1073 }
1074
1075 job, err := compiler.buildConclusionJob(workflowData, string(constants.AgentJobName), []string{})
1076 if err != nil {
1077 t.Fatalf("Failed to build conclusion job: %v", err)
1078 }
1079 if job == nil {
1080 t.Fatal("Expected conclusion job to be created")
1081 }
1082
1083 allSteps := strings.Join(job.Steps, "\n")
1084 if strings.Contains(allSteps, "GH_AW_PUSH_REPO_MEMORY_RESULT") {
1085 t.Error("Expected conclusion job to NOT include GH_AW_PUSH_REPO_MEMORY_RESULT when repo-memory is not configured")
1086 }
1087}
1088
1089// TestConclusionJobWorkflowCallArtifactPrefix verifies that the conclusion job uses the
1090// prefixed artifact name in workflow_call context to match the upload step.

Callers

nothing calls this directly

Calls 3

buildConclusionJobMethod · 0.95
NewCompilerFunction · 0.85
ErrorMethod · 0.45

Tested by

no test coverage detected