Skip to content

Commit 85b62b1

Browse files
committed
Refactor & more tests
1 parent 7b8b0c0 commit 85b62b1

1 file changed

Lines changed: 6 additions & 3 deletions

File tree

test/integration/emulator_select_test.go

Lines changed: 6 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -17,13 +17,16 @@ import (
1717
"github.com/stretchr/testify/require"
1818
)
1919

20-
// freshConfigEnv returns an Environ pointing HOME at a new temp directory
21-
// (with .config/ pre-created) so lstk uses an isolated, empty config dir.
20+
// freshConfigEnv returns an Environ pointing HOME and USERPROFILE at a new
21+
// temp directory (with .config/ pre-created) so lstk uses an isolated config
22+
// dir on both Unix (HOME) and Windows (USERPROFILE).
2223
func freshConfigEnv(t *testing.T) (env.Environ, string) {
2324
t.Helper()
2425
tmpHome := t.TempDir()
2526
require.NoError(t, os.MkdirAll(filepath.Join(tmpHome, ".config"), 0755))
26-
return env.Without(env.Home).With(env.Home, tmpHome), tmpHome
27+
return env.Without(env.Home).
28+
With(env.Home, tmpHome).
29+
With("USERPROFILE", tmpHome), tmpHome
2730
}
2831

2932
func TestEmulatorFlagSwitchesConfigToSnowflake(t *testing.T) {

0 commit comments

Comments
 (0)