test: repo migrations fetch - support windows wanting binaries to end in .exe
Adin Schmahmann committed
Mar 25, 2021 at 15:53 UTC
891c81e631a559d831ba3687bfb48dd4d7af033c
1 file changed
+2
-1
repo/fsrepo/migrations/fetch_test.go
+2
-1
@@ -40,6 +40,7 @@ func createFakeArchive(name string, archZip bool, w io.Writer) {
40
if fileName == "go-ipfs" {
41
fileName = "ipfs"
42
}
43
+ fileName = ExeName(fileName)
44
45
var err error
46
if archZip {
@@ -179,7 +180,7 @@ func TestFetchBinary(t *testing.T) {
180
t.Error("expected 'exists' error, got:", err)
181
}
182
182
- os.Remove(path.Join(tmpDir, "ipfs"))
183
+ os.Remove(path.Join(tmpDir, ExeName("ipfs")))
184
185
// Check error creating temp download directory
186
err = os.Chmod(tmpDir, 0555)