Merge pull request #26136 from hashicorp/alisdair/fix-providercache-test-failures-on-macOS

internal: Fix providercache test failures on macOS
This commit is contained in:
Alisdair McDiarmid 2020-09-08 09:45:12 -04:00 committed by GitHub
commit a176aaa4da
No known key found for this signature in database
GPG Key ID: 4AEE18F83AFDEB23
1 changed files with 9 additions and 0 deletions

View File

@ -4,6 +4,7 @@ import (
"context"
"io/ioutil"
"os"
"path/filepath"
"testing"
"github.com/apparentlymart/go-versions/versions"
@ -19,6 +20,10 @@ func TestInstallPackage(t *testing.T) {
t.Fatal(err)
}
defer os.RemoveAll(tmpDirPath)
tmpDirPath, err = filepath.EvalSymlinks(tmpDirPath)
if err != nil {
t.Fatal(err)
}
linuxPlatform := getproviders.Platform{
OS: "linux",
@ -74,6 +79,10 @@ func TestLinkFromOtherCache(t *testing.T) {
t.Fatal(err)
}
defer os.RemoveAll(tmpDirPath)
tmpDirPath, err = filepath.EvalSymlinks(tmpDirPath)
if err != nil {
t.Fatal(err)
}
windowsPlatform := getproviders.Platform{
OS: "windows",