test with latest distribution

This commit is contained in:
gammazero 2021-02-01 16:48:49 -08:00
parent 0942e3be66
commit 9d1fdccdca
2 changed files with 4 additions and 2 deletions

View File

@ -184,7 +184,7 @@ func fetchMigrations(ctx context.Context, needed []string, destDir string) ([]st
log.Printf("could not download %s: %s", name, err)
return
}
log.Printf("Downloaded and unpacked migration: %s", loc)
log.Printf("Downloaded and unpacked migration: %s (%s)", loc, ver)
bins[i] = loc
}(i, name)
}

View File

@ -10,6 +10,8 @@ import (
"testing"
)
const testIPFSDistPath = "/ipfs/Qme8pJhBidEUXRdpcWLGR2fkG5kdwVnaMh3kabjfP8zz7Y"
func TestFindMigrations(t *testing.T) {
tmpDir, err := ioutil.TempDir("", "migratetest")
if err != nil {
@ -116,7 +118,7 @@ func TestFetchMigrations(t *testing.T) {
ctx, cancel := context.WithCancel(context.Background())
defer cancel()
SetIpfsDistPath("/ipfs/QmXt92hFRuvQgFhgHoaMxC4wLFcvKsCywQPTNmPYCGfEV4")
SetIpfsDistPath(testIPFSDistPath)
_, err := LatestDistVersion(ctx, "ipfs-1-to-2")
if err != nil {
if strings.Contains(err.Error(), http.StatusText(http.StatusNotFound)) {