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)
| 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). |
| 1066 | func 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. |
nothing calls this directly
no test coverage detected