Skip to content

Commit 0928b8b

Browse files
committed
Unset all envs
1 parent 6450177 commit 0928b8b

File tree

1 file changed

+2
-4
lines changed

1 file changed

+2
-4
lines changed

cli/root_test.go

Lines changed: 2 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -54,12 +54,10 @@ func TestCommandHelp(t *testing.T) {
5454
for _, tt := range tests {
5555
tt := tt
5656
t.Run(tt.name, func(t *testing.T) {
57-
// Unset all CODER_ environment variables for a clean slate.
57+
// Unset all environment variables for a clean slate.
5858
for _, kv := range os.Environ() {
5959
name := strings.Split(kv, "=")[0]
60-
if _, ok := tt.env[name]; !ok && strings.HasPrefix(name, "CODER_") {
61-
t.Setenv(name, "")
62-
}
60+
t.Setenv(name, "")
6361
}
6462
// Override environment variables for a reproducible test.
6563
for k, v := range tt.env {

0 commit comments

Comments
 (0)