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
go-dms3
Commits
c3e69073
Commit
c3e69073
authored
Aug 02, 2018
by
Łukasz Magiera
Committed by
Steven Allen
Aug 27, 2018
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
block cmd: go-path update
License: MIT Signed-off-by:
Łukasz Magiera
<
magik6k@gmail.com
>
parent
daae93ad
Changes
1
Show whitespace changes
Inline
Side-by-side
Showing
1 changed file
with
14 additions
and
0 deletions
+14
-0
core/coreapi/block_test.go
core/coreapi/block_test.go
+14
-0
No files found.
core/coreapi/block_test.go
View file @
c3e69073
...
...
@@ -6,6 +6,7 @@ import (
"strings"
"testing"
coreiface
"github.com/ipfs/go-ipfs/core/coreapi/interface"
opt
"github.com/ipfs/go-ipfs/core/coreapi/interface/options"
mh
"gx/ipfs/QmPnFwZ2JXKnXgMw8CdBPxn7FWh6LLdjUjxV1fKHuJnkr8/go-multihash"
...
...
@@ -87,6 +88,19 @@ func TestBlockGet(t *testing.T) {
if
string
(
d
)
!=
"Hello"
{
t
.
Error
(
"didn't get correct data back"
)
}
p
,
err
:=
coreiface
.
ParsePath
(
"/ipfs/"
+
res
.
Path
()
.
Cid
()
.
String
())
if
err
!=
nil
{
t
.
Error
(
err
)
}
rp
,
err
:=
api
.
ResolvePath
(
ctx
,
p
)
if
err
!=
nil
{
t
.
Fatal
(
err
)
}
if
rp
.
Cid
()
.
String
()
!=
res
.
Path
()
.
Cid
()
.
String
()
{
t
.
Error
(
"paths didn't match"
)
}
}
func
TestBlockRm
(
t
*
testing
.
T
)
{
...
...
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