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

Commit

Permalink
chore: fix linter nits and tests that don't compile
Browse files Browse the repository at this point in the history
  • Loading branch information
Stebalien committed May 21, 2019
1 parent b65e2db commit 6a45588
Showing 1 changed file with 6 additions and 6 deletions.
12 changes: 6 additions & 6 deletions resolve/pathresolver_test.go
Original file line number Diff line number Diff line change
Expand Up @@ -16,17 +16,17 @@ func TestResolveNoComponents(t *testing.T) {
}

_, err = resolve.Resolve(n.Context(), n.Namesys, n.Resolver, path.Path("/ipns/"))
if err != path.ErrNoComponents {
t.Fatal("Should error with no components (/ipns/).", err)
if err.Error() != "invalid path \"/ipns/\": ipns path missing IPNS ID" {
t.Error("Should error with no components (/ipns/).", err)
}

_, err = resolve.Resolve(n.Context(), n.Namesys, n.Resolver, path.Path("/ipfs/"))
if err != path.ErrNoComponents {
t.Fatal("Should error with no components (/ipfs/).", err)
if err.Error() != "invalid path \"/ipfs/\": not enough path components" {
t.Error("Should error with no components (/ipfs/).", err)
}

_, err = resolve.Resolve(n.Context(), n.Namesys, n.Resolver, path.Path("/../.."))
if err != path.ErrBadPath {
t.Fatal("Should error with invalid path.", err)
if err.Error() != "invalid path \"/../..\": unknown namespace \"..\"" {
t.Error("Should error with invalid path.", err)
}
}

0 comments on commit 6a45588

Please sign in to comment.