backport of commit 40a23400e9

backport/acc_test_logic/wrongly-witty-moccasin
Lucas Bajolet 2 years ago
parent 66a3180ec3
commit e1e7154dd4

@ -5,8 +5,6 @@ import (
"fmt"
"os"
"path/filepath"
"runtime"
"strings"
)
func (ts *PackerTestSuite) TestLoadingOrder() {
@ -119,14 +117,9 @@ func (ts *PackerTestSuite) TestLoadWithSHAMismatches() {
defer cleanup()
pluginDestName := ExpectedInstalledName("1.0.10")
noExtDest := pluginDestName
if runtime.GOOS == "windows" {
noExtDest = strings.Replace(pluginDestName, ".exe", "", 1)
}
CopyFile(ts.T(), filepath.Join(pluginDir, "github.com", "hashicorp", "tester", pluginDestName), plugin)
WriteFile(ts.T(),
filepath.Join(pluginDir, "github.com", "hashicorp", "tester", fmt.Sprintf("%s_SHA256SUM", noExtDest)),
filepath.Join(pluginDir, "github.com", "hashicorp", "tester", fmt.Sprintf("%s_SHA256SUM", pluginDestName)),
fmt.Sprintf("%x", sha256.New().Sum([]byte("Not the plugin's contents for sure."))))
ts.PackerCommand().UsePluginDir(pluginDir).

@ -328,10 +328,6 @@ func ManualPluginInstall(t *testing.T, dest, srcPlugin, versionStr string) {
CopyFile(t, destPath, srcPlugin)
shaPath := destPath
if runtime.GOOS == "windows" {
shaPath = strings.Replace(destPath, ".exe", "", 1)
}
shaPath = fmt.Sprintf("%s_SHA256SUM", shaPath)
shaPath := fmt.Sprintf("%s_SHA256SUM", destPath)
WriteFile(t, shaPath, SHA256Sum(t, destPath))
}

Loading…
Cancel
Save