Skip to content

Commit

Permalink
Fix makefile and previous migration to actually be able to run tests
Browse files Browse the repository at this point in the history
  • Loading branch information
hsanjuan committed Apr 26, 2021
1 parent a80e818 commit bca561a
Show file tree
Hide file tree
Showing 2 changed files with 6 additions and 6 deletions.
4 changes: 2 additions & 2 deletions Makefile
Original file line number Diff line number Diff line change
Expand Up @@ -35,9 +35,9 @@ clean.%: MIGRATION=$*
clean.%:
make -C $(MIGRATION) clean

test_go: $(shell ls -d fs-repo-*-to-*/migration | sed -e 's/fs-repo/test_go.fs-repo/')
test_go: $(shell ls -d fs-repo-*-to-* | sed -e 's/fs-repo/test_go.fs-repo/')
@echo OK

test_go.%: MIGRATION=$*
test_go.%:
@cd $(MIGRATION) && go test -mod=vendor
@cd $(MIGRATION)/migration && go test -mod=vendor
8 changes: 4 additions & 4 deletions fs-repo-10-to-11/migration/migration.go
Original file line number Diff line number Diff line change
Expand Up @@ -11,14 +11,14 @@ import (
"github.com/ipfs/go-blockservice"
"github.com/ipfs/go-datastore"
"github.com/ipfs/go-filestore"
"github.com/ipfs/go-ipfs-blockstore"
"github.com/ipfs/go-ipfs-exchange-offline"
blockstore "github.com/ipfs/go-ipfs-blockstore"
offline "github.com/ipfs/go-ipfs-exchange-offline"
"github.com/ipfs/go-ipfs-pinner/pinconv"
"github.com/ipfs/go-ipfs/plugin/loader"
"github.com/ipfs/go-ipfs/repo"
"github.com/ipfs/go-ipfs/repo/fsrepo"
"github.com/ipfs/go-ipfs/repo/fsrepo/migrations"
"github.com/ipfs/go-ipld-format"
format "github.com/ipfs/go-ipld-format"
"github.com/ipfs/go-merkledag"

migrate "github.com/ipfs/fs-repo-migrations/tools/go-migrate"
Expand Down Expand Up @@ -88,7 +88,7 @@ func (m Migration) Apply(opts migrate.Options) error {

err = migrations.WriteRepoVersion(opts.Path, toVer)
if err != nil {
return fmt.Errorf("failed to update version file to %s: %v", toVer, err)
return fmt.Errorf("failed to update version file to %d: %v", toVer, err)
}

log.Print("updated version file")
Expand Down

0 comments on commit bca561a

Please sign in to comment.