Skip to content

Commit

Permalink
Make test pass
Browse files Browse the repository at this point in the history
  • Loading branch information
pinosu authored and alpe committed Sep 29, 2023
1 parent fcc47fa commit 52adf1a
Showing 1 changed file with 7 additions and 1 deletion.
8 changes: 7 additions & 1 deletion tests/system/upgrade_test.go
Original file line number Diff line number Diff line change
Expand Up @@ -90,7 +90,13 @@ const cacheDir = "binaries"
// FetchExecutable to download and extract tar.gz for linux
func FetchExecutable(t *testing.T, version string) string {
// use local cache
cacheFile := filepath.Join(workDir, cacheDir, fmt.Sprintf("%s_%s", execBinaryName, version))
cacheFolder := filepath.Join(workDir, cacheDir)
err := os.MkdirAll(cacheFolder, 0777)
if err != nil && !os.IsExist(err) {
panic(err)
}

cacheFile := filepath.Join(cacheFolder, fmt.Sprintf("%s_%s", execBinaryName, version))
if _, err := os.Stat(cacheFile); err == nil {
return cacheFile
}
Expand Down

0 comments on commit 52adf1a

Please sign in to comment.