From cdefa3c9d3dcd325510b852a3089a2505093fbcf Mon Sep 17 00:00:00 2001 From: Simone Margaritelli Date: Fri, 16 Aug 2024 15:53:42 +0200 Subject: [PATCH] fix: attempt to fix tests on windows --- session/environment_test.go | 6 +++--- 1 file changed, 3 insertions(+), 3 deletions(-) diff --git a/session/environment_test.go b/session/environment_test.go index 2ce84966..8c44c6a9 100644 --- a/session/environment_test.go +++ b/session/environment_test.go @@ -6,11 +6,13 @@ import ( "os" "path/filepath" "reflect" + "strings" "testing" ) var ( - testEnvFile = "test.env" + // fix for weird bug on windows github action + testEnvFile = strings.Replace(filepath.Join(os.TempDir(), "test.env"), "C:\\Users\\RUNNER", "", 1) testEnvData = map[string]string{ "people": "shit", "moo": "boo", @@ -20,8 +22,6 @@ var ( ) func setup(t testing.TB, envFile bool, envFileData bool) { - testEnvFile = filepath.Join(t.TempDir(), "test.env") - teardown(t) if envFile {