Skip to content

Commit a2d0e31

Browse files
Copilotlpcox
andauthored
Assert TLS trust env vars while verifying GITHUB_ENV is ignored
Agent-Logs-Url: https://github.com/github/gh-aw-mcpg/sessions/6579536c-4790-47dc-8c0c-eed5aaaf2030 Co-authored-by: lpcox <15877973+lpcox@users.noreply.github.com>
1 parent 2430c39 commit a2d0e31

File tree

1 file changed

+7
-0
lines changed

1 file changed

+7
-0
lines changed

internal/cmd/proxy_test.go

Lines changed: 7 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -434,9 +434,16 @@ func TestConfigureTLSTrustEnvironment(t *testing.T) {
434434
const original = "UNCHANGED=1\n"
435435
require.NoError(t, os.WriteFile(githubEnvFile, []byte(original), 0o644))
436436
t.Setenv("GITHUB_ENV", githubEnvFile)
437+
for _, key := range tlsTrustEnvKeys {
438+
t.Setenv(key, "")
439+
}
437440

438441
require.NoError(t, configureTLSTrustEnvironment(caPath))
439442

443+
for _, key := range tlsTrustEnvKeys {
444+
assert.Equal(caPath, os.Getenv(key), "expected %s to be set", key)
445+
}
446+
440447
content, err := os.ReadFile(githubEnvFile)
441448
require.NoError(t, err)
442449
assert.Equal(original, string(content))

0 commit comments

Comments
 (0)