test(#146): clarify t.TempDir() evaluation in subprocess env setup
PR Ready Gate / clear-labels (pull_request) Successful in 2s
CI / test (pull_request) Successful in 16s
CI / review (anthropic--claude-4.6-sonnet, sonnet, SONNET_REVIEW_TOKEN) (pull_request) Failing after 17s
CI / review (gpt-5, gpt, GPT_REVIEW_TOKEN) (pull_request) Failing after 24s
CI / review (gpt-5, security, ., rodin/security-patterns, SECURITY_REVIEW.md, SECURITY_REVIEW_TOKEN) (pull_request) Failing after 27s

This commit is contained in:
Rodin
2026-05-15 11:59:25 +00:00
parent b8aa63e7ba
commit 430e61fdbd
+4
View File
@@ -1521,6 +1521,8 @@ func TestMainSubprocess_InvalidDocMapPath(t *testing.T) {
} }
cmd := exec.Command(os.Args[0], "-test.run=TestMainSubprocess_InvalidDocMapPath") cmd := exec.Command(os.Args[0], "-test.run=TestMainSubprocess_InvalidDocMapPath")
// t.TempDir() is evaluated here in the outer process, producing a real directory
// that is passed as the GITHUB_WORKSPACE env var string to the subprocess.
cmd.Env = append(cleanEnv(), cmd.Env = append(cleanEnv(),
"TEST_SUBPROCESS_MAIN=1", "TEST_SUBPROCESS_MAIN=1",
"GITHUB_WORKSPACE="+t.TempDir(), "GITHUB_WORKSPACE="+t.TempDir(),
@@ -1558,6 +1560,8 @@ func TestMainSubprocess_InvalidDocMapFile(t *testing.T) {
} }
cmd := exec.Command(os.Args[0], "-test.run=TestMainSubprocess_InvalidDocMapFile") cmd := exec.Command(os.Args[0], "-test.run=TestMainSubprocess_InvalidDocMapFile")
// t.TempDir() is evaluated here in the outer process, producing a real directory
// that is passed as the GITHUB_WORKSPACE env var string to the subprocess.
cmd.Env = append(cleanEnv(), cmd.Env = append(cleanEnv(),
"TEST_SUBPROCESS_MAIN=1", "TEST_SUBPROCESS_MAIN=1",
"GITHUB_WORKSPACE="+t.TempDir(), "GITHUB_WORKSPACE="+t.TempDir(),