mirror of
https://github.com/ipfs/kubo.git
synced 2026-03-07 09:17:49 +08:00
test with latest distribution
This commit is contained in:
parent
0942e3be66
commit
9d1fdccdca
@ -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)
|
||||
}
|
||||
|
||||
@ -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)) {
|
||||
|
||||
Loading…
Reference in New Issue
Block a user