diff --git a/cmd/webhooker/main_test.go b/cmd/webhooker/main_test.go index 851c4d8..ad1d5cf 100644 --- a/cmd/webhooker/main_test.go +++ b/cmd/webhooker/main_test.go @@ -14,6 +14,7 @@ import ( "github.com/stretchr/testify/assert" "github.com/stretchr/testify/require" + "sneak.berlin/go/webhooker/internal/config" "sneak.berlin/go/webhooker/internal/datadir" "sneak.berlin/go/webhooker/internal/resetpw" "sneak.berlin/go/webhooker/internal/server" @@ -36,6 +37,7 @@ const dockerStopGrace = 10 * time.Second // fx.New applies options before it executes invokes, so the timeout // is set whether or not the graph itself can be constructed here. func TestNewApp_StopTimeout(t *testing.T) { + config.ClearEnvForTest(t) t.Setenv("DATA_DIR", t.TempDir()) got := newApp().StopTimeout() @@ -73,6 +75,7 @@ func freePort(t *testing.T) int { // anything is built, and the run of logger.New, which happens before // the configuration sets the level. func TestNewApp_SendsFxEventsToTheLogger(t *testing.T) { + config.ClearEnvForTest(t) t.Setenv("DATA_DIR", t.TempDir()) t.Setenv("PORT", strconv.Itoa(freePort(t))) t.Setenv("DEBUG", "true")