diff --git a/internal/initwd/from_module_test.go b/internal/initwd/from_module_test.go index 480ead680..b467552b5 100644 --- a/internal/initwd/from_module_test.go +++ b/internal/initwd/from_module_test.go @@ -19,7 +19,11 @@ func TestDirFromModule_registry(t *testing.T) { } fixtureDir := filepath.Clean("testdata/empty") - dir, done := tempChdir(t, fixtureDir) + tmpDir, done := tempChdir(t, fixtureDir) + dir, err := filepath.EvalSymlinks(tmpDir) + if err != nil { + t.Error(err) + } modsDir := filepath.Join(dir, ".terraform/modules") defer done() diff --git a/internal/initwd/module_install_test.go b/internal/initwd/module_install_test.go index 27a82aef7..786f84400 100644 --- a/internal/initwd/module_install_test.go +++ b/internal/initwd/module_install_test.go @@ -232,7 +232,12 @@ func TestLoaderInstallModules_registry(t *testing.T) { } fixtureDir := filepath.Clean("testdata/registry-modules") - dir, done := tempChdir(t, fixtureDir) + tmpDir, done := tempChdir(t, fixtureDir) + dir, err := filepath.EvalSymlinks(tmpDir) + if err != nil { + t.Error(err) + } + defer done() hooks := &testInstallHooks{} @@ -359,7 +364,11 @@ func TestLoaderInstallModules_goGetter(t *testing.T) { } fixtureDir := filepath.Clean("testdata/go-getter-modules") - dir, done := tempChdir(t, fixtureDir) + tmpDir, done := tempChdir(t, fixtureDir) + dir, err := filepath.EvalSymlinks(tmpDir) + if err != nil { + t.Error(err) + } defer done() hooks := &testInstallHooks{}