Skip to content

Commit 243207e

Browse files
Andrew Farriesroboquat
Andrew Farries
authored andcommitted
Clear GITPOD_HOST env var before test
This test fails when run (via `go test`) from a gitpod workspace because gitpod workspaces have the `GITPOD_HOST` env var set, causing the `NewClient` call to return a `ConfigCatClient` rather than a `alwaysReturningDefaultValueClient` struct. Clear the env var before the test runs to avoid this.
1 parent d1bf1b9 commit 243207e

File tree

1 file changed

+1
-0
lines changed

1 file changed

+1
-0
lines changed

components/common-go/experiments/types_test.go

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -10,6 +10,7 @@ import (
1010
)
1111

1212
func TestNewClient_WithoutEnvSet(t *testing.T) {
13+
t.Setenv("GITPOD_HOST", "")
1314
client := NewClient()
1415
require.IsType(t, &alwaysReturningDefaultValueClient{}, client)
1516
}

0 commit comments

Comments
 (0)