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 <acruikshank@example.com> This commit was moved from ipfs/interface-go-ipfs-core@49cdff8024e607072e57a7f7556e9875d2aa0412 This commit was moved from ipfs/boxo@8f0db8f18428127afb5e6c114ada8c751d5116de
Hannah Howard committed
Aug 12, 2021 at 09:35 UTC
58c9824ce49e83378d63d6c3a1aa9ed2f2417a5b
2 files changed
+6
-2
core/coreiface/coreapi.go
+1
@@ -4,6 +4,7 @@ package iface
4
5
import (
6
"context"
7
+
8
path "github.com/ipfs/interface-go-ipfs-core/path"
9
10
"github.com/ipfs/interface-go-ipfs-core/options"
core/coreiface/tests/path.go
+5
-2
@@ -2,11 +2,14 @@ package tests
2
3
import (
4
"context"
5
- "github.com/ipfs/interface-go-ipfs-core/path"
5
+ "errors"
6
"math"
7
"strings"
8
"testing"
9
10
+ "github.com/ipfs/go-path/resolver"
11
+ "github.com/ipfs/interface-go-ipfs-core/path"
12
+
13
"github.com/ipfs/interface-go-ipfs-core/options"
14
15
ipldcbor "github.com/ipfs/go-ipld-cbor"
@@ -138,7 +141,7 @@ func (tp *TestSuite) TestInvalidPathRemainder(t *testing.T) {
141
}
142
143
_, err = api.ResolvePath(ctx, path.New("/ipld/"+nd.Cid().String()+"/bar/baz"))
141
- if err == nil || !strings.Contains(err.Error(), "no such link found") {
144
+ if err == nil || !errors.As(err, &resolver.ErrNoLink{}) {
145
t.Fatalf("unexpected error: %s", err)
146
}
147
}