test with latest distribution
gammazero committed
Feb 1, 2021 at 16:48 UTC
9d1fdccdca84a13b0c7760bb90c0088973f5a63b
2 files changed
+4
-2
repo/fsrepo/migrations/migrations.go
+1
-1
@@ -184,7 +184,7 @@ func fetchMigrations(ctx context.Context, needed []string, destDir string) ([]st
184
log.Printf("could not download %s: %s", name, err)
185
return
186
}
187
- log.Printf("Downloaded and unpacked migration: %s", loc)
187
+ log.Printf("Downloaded and unpacked migration: %s (%s)", loc, ver)
188
bins[i] = loc
189
}(i, name)
190
}
repo/fsrepo/migrations/migrations_test.go
+3
-1
@@ -10,6 +10,8 @@ import (
10
"testing"
11
)
12
13
+const testIPFSDistPath = "/ipfs/Qme8pJhBidEUXRdpcWLGR2fkG5kdwVnaMh3kabjfP8zz7Y"
14
+
15
func TestFindMigrations(t *testing.T) {
16
tmpDir, err := ioutil.TempDir("", "migratetest")
17
if err != nil {
@@ -116,7 +118,7 @@ func TestFetchMigrations(t *testing.T) {
118
ctx, cancel := context.WithCancel(context.Background())
119
defer cancel()
120
119
- SetIpfsDistPath("/ipfs/QmXt92hFRuvQgFhgHoaMxC4wLFcvKsCywQPTNmPYCGfEV4")
121
+ SetIpfsDistPath(testIPFSDistPath)
122
_, err := LatestDistVersion(ctx, "ipfs-1-to-2")
123
if err != nil {
124
if strings.Contains(err.Error(), http.StatusText(http.StatusNotFound)) {