test: repo migrations fetch - support windows wanting binaries to end in .exe

This commit is contained in:
Adin Schmahmann 2021-03-25 15:53:15 -04:00
parent 09a481ea7a
commit 891c81e631

View File

@ -40,6 +40,7 @@ func createFakeArchive(name string, archZip bool, w io.Writer) {
if fileName == "go-ipfs" {
fileName = "ipfs"
}
fileName = ExeName(fileName)
var err error
if archZip {
@ -179,7 +180,7 @@ func TestFetchBinary(t *testing.T) {
t.Error("expected 'exists' error, got:", err)
}
os.Remove(path.Join(tmpDir, "ipfs"))
os.Remove(path.Join(tmpDir, ExeName("ipfs")))
// Check error creating temp download directory
err = os.Chmod(tmpDir, 0555)