Skip to content

Commit

Permalink
feat: plumb through context changes
Browse files Browse the repository at this point in the history
This commit was moved from ipfs/go-path@6f59923
  • Loading branch information
guseggert committed Oct 21, 2021
1 parent 6019ba3 commit b7dfe90
Showing 1 changed file with 6 additions and 6 deletions.
12 changes: 6 additions & 6 deletions path/resolver/resolver_test.go
Original file line number Diff line number Diff line change
Expand Up @@ -57,7 +57,7 @@ func TestRecurivePathResolution(t *testing.T) {
}

for _, n := range []*merkledag.ProtoNode{a, b, c} {
err = bsrv.AddBlock(n)
err = bsrv.AddBlock(ctx, n)
if err != nil {
t.Fatal(err)
}
Expand Down Expand Up @@ -151,7 +151,7 @@ func TestResolveToLastNode_ErrNoLink(t *testing.T) {
}

for _, n := range []*merkledag.ProtoNode{a, b, c} {
err = bsrv.AddBlock(n)
err = bsrv.AddBlock(ctx, n)
if err != nil {
t.Fatal(err)
}
Expand Down Expand Up @@ -197,7 +197,7 @@ func TestResolveToLastNode_NoUnnecessaryFetching(t *testing.T) {
err := a.AddNodeLink("child", b)
require.NoError(t, err)

err = bsrv.AddBlock(a)
err = bsrv.AddBlock(ctx, a)
require.NoError(t, err)

aKey := a.Cid()
Expand Down Expand Up @@ -243,7 +243,7 @@ func TestPathRemainder(t *testing.T) {
require.NoError(t, err)
blk, err := blocks.NewBlockWithCid(out.Bytes(), lnk)
require.NoError(t, err)
bsrv.AddBlock(blk)
bsrv.AddBlock(ctx, blk)
fetcherFactory := bsfetcher.NewFetcherConfig(bsrv)
resolver := resolver.NewBasicResolver(fetcherFactory)

Expand All @@ -259,7 +259,7 @@ func TestResolveToLastNode_MixedSegmentTypes(t *testing.T) {
defer cancel()
bsrv := dagmock.Bserv()
a := randNode()
err := bsrv.AddBlock(a)
err := bsrv.AddBlock(ctx, a)
if err != nil {
t.Fatal(err)
}
Expand All @@ -281,7 +281,7 @@ func TestResolveToLastNode_MixedSegmentTypes(t *testing.T) {
require.NoError(t, err)
blk, err := blocks.NewBlockWithCid(out.Bytes(), lnk)
require.NoError(t, err)
bsrv.AddBlock(blk)
bsrv.AddBlock(ctx, blk)
fetcherFactory := bsfetcher.NewFetcherConfig(bsrv)
resolver := resolver.NewBasicResolver(fetcherFactory)

Expand Down

0 comments on commit b7dfe90

Please sign in to comment.