From 72af89d5624fee313ef7bcb0b57b67ffc7da0b9b Mon Sep 17 00:00:00 2001 From: Hannah Howard Date: Thu, 12 Aug 2021 09:35:49 -0700 Subject: [PATCH] IPLD In IPFS: Target Merge Branch (#67) * update go-path and error message * add node api for prime interactions * use go-unixfsnode * update against fetcher Co-authored-by: acruikshank This commit was moved from ipfs/interface-go-ipfs-core@49cdff8024e607072e57a7f7556e9875d2aa0412 --- coreiface/coreapi.go | 1 + coreiface/tests/path.go | 7 +++++-- 2 files changed, 6 insertions(+), 2 deletions(-) diff --git a/coreiface/coreapi.go b/coreiface/coreapi.go index 12cb166a8..aacda0459 100644 --- a/coreiface/coreapi.go +++ b/coreiface/coreapi.go @@ -4,6 +4,7 @@ package iface import ( "context" + path "github.com/ipfs/interface-go-ipfs-core/path" "github.com/ipfs/interface-go-ipfs-core/options" diff --git a/coreiface/tests/path.go b/coreiface/tests/path.go index 2d9497244..5a249fabf 100644 --- a/coreiface/tests/path.go +++ b/coreiface/tests/path.go @@ -2,11 +2,14 @@ package tests import ( "context" - "github.com/ipfs/interface-go-ipfs-core/path" + "errors" "math" "strings" "testing" + "github.com/ipfs/go-path/resolver" + "github.com/ipfs/interface-go-ipfs-core/path" + "github.com/ipfs/interface-go-ipfs-core/options" ipldcbor "github.com/ipfs/go-ipld-cbor" @@ -138,7 +141,7 @@ func (tp *TestSuite) TestInvalidPathRemainder(t *testing.T) { } _, err = api.ResolvePath(ctx, path.New("/ipld/"+nd.Cid().String()+"/bar/baz")) - if err == nil || !strings.Contains(err.Error(), "no such link found") { + if err == nil || !errors.As(err, &resolver.ErrNoLink{}) { t.Fatalf("unexpected error: %s", err) } }