diff --git a/packer_test/loading_test.go b/packer_test/loading_test.go index 5effa662b..59126a053 100644 --- a/packer_test/loading_test.go +++ b/packer_test/loading_test.go @@ -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). diff --git a/packer_test/plugin_test.go b/packer_test/plugin_test.go index f3376f874..b3be0339b 100644 --- a/packer_test/plugin_test.go +++ b/packer_test/plugin_test.go @@ -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)) }