Skip to content
This repository has been archived by the owner on Jun 19, 2023. It is now read-only.

Update error message for go-ipld-prime path resolution #75

Closed
wants to merge 1 commit into from
Closed
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
7 changes: 5 additions & 2 deletions tests/path.go
Original file line number Diff line number Diff line change
Expand Up @@ -2,11 +2,12 @@ package tests

import (
"context"
"github.com/ipfs/interface-go-ipfs-core/path"
"math"
"strings"
"testing"

"github.com/ipfs/interface-go-ipfs-core/path"

"github.com/ipfs/interface-go-ipfs-core/options"

ipldcbor "github.com/ipfs/go-ipld-cbor"
Expand Down Expand Up @@ -138,7 +139,9 @@ 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 ||
(!strings.Contains(err.Error(), "no such link found") && // pre-ipld-prime error msg
!strings.Contains(err.Error(), "no link named \"bar\" under bafyreidddp34f6fnymowkvohkxvk4dk5zjt7z35tmhpctzw6cfpcna4xvq")) { // go-ipld-prime error msg
t.Fatalf("unexpected error: %s", err)
}
}
Expand Down