Skip to content
GitLab
Projects
Groups
Snippets
Help
Loading...
Help
What's new
10
Help
Support
Community forum
Keyboard shortcuts
?
Submit feedback
Contribute to GitLab
Sign in
Toggle navigation
Open sidebar
dms3
interface-go-dms3-core
Commits
b4e7753b
Commit
b4e7753b
authored
Jan 21, 2019
by
Łukasz Magiera
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
coreapi: few more error check fixes
License: MIT Signed-off-by:
Łukasz Magiera
<
magik6k@gmail.com
>
parent
071eb76b
Changes
3
Show whitespace changes
Inline
Side-by-side
Showing
3 changed files
with
3 additions
and
3 deletions
+3
-3
tests/dag.go
tests/dag.go
+1
-1
tests/path.go
tests/path.go
+1
-1
tests/unixfs.go
tests/unixfs.go
+1
-1
No files found.
tests/dag.go
View file @
b4e7753b
...
...
@@ -185,7 +185,7 @@ func (tp *provider) TestBatch(t *testing.T) {
}
_
,
err
=
api
.
Dag
()
.
Get
(
ctx
,
nds
[
0
]
.
Cid
())
if
err
==
nil
||
err
.
Error
()
!=
"merkledag:
not found"
{
if
err
==
nil
||
!
strings
.
Contains
(
err
.
Error
(),
"
not found"
)
{
t
.
Error
(
err
)
}
...
...
tests/path.go
View file @
b4e7753b
...
...
@@ -151,7 +151,7 @@ func (tp *provider) TestInvalidPathRemainder(t *testing.T) {
}
_
,
err
=
api
.
ResolvePath
(
ctx
,
p1
)
if
err
==
nil
||
err
.
Error
()
!=
"no such link found"
{
if
err
==
nil
||
!
strings
.
Contains
(
err
.
Error
()
,
"no such link found"
)
{
t
.
Fatalf
(
"unexpected error: %s"
,
err
)
}
}
...
...
tests/unixfs.go
View file @
b4e7753b
...
...
@@ -587,7 +587,7 @@ func (tp *provider) TestAddHashOnly(t *testing.T) {
if
err
==
nil
{
t
.
Fatal
(
"expected an error"
)
}
if
err
.
Error
()
!=
"blockservice: key not found"
{
if
!
strings
.
Contains
(
err
.
Error
()
,
"blockservice: key not found"
)
{
t
.
Errorf
(
"unxepected error: %s"
,
err
.
Error
())
}
}
...
...
Write
Preview
Markdown
is supported
0%
Try again
or
attach a new file
.
Attach a file
Cancel
You are about to add
0
people
to the discussion. Proceed with caution.
Finish editing this message first!
Cancel
Please
register
or
sign in
to comment