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
48dcedec
Unverified
Commit
48dcedec
authored
Nov 29, 2019
by
Michael Muré
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
fix some tests
parent
f976af7b
Changes
2
Hide whitespace changes
Inline
Side-by-side
Showing
2 changed files
with
4 additions
and
4 deletions
+4
-4
tests/block.go
tests/block.go
+1
-1
tests/pin.go
tests/pin.go
+3
-3
No files found.
tests/block.go
View file @
48dcedec
...
@@ -227,7 +227,7 @@ func (tp *TestSuite) TestBlockPin(t *testing.T) {
...
@@ -227,7 +227,7 @@ func (tp *TestSuite) TestBlockPin(t *testing.T) {
pins
,
err
:=
accPins
(
api
.
Pin
()
.
Ls
(
ctx
))
pins
,
err
:=
accPins
(
api
.
Pin
()
.
Ls
(
ctx
))
if
err
!=
nil
{
if
err
!=
nil
{
return
t
.
Skip
(
err
)
}
}
if
len
(
pins
)
!=
1
{
if
len
(
pins
)
!=
1
{
t
.
Fatal
(
"expected 1 pin"
)
t
.
Fatal
(
"expected 1 pin"
)
...
...
tests/pin.go
View file @
48dcedec
...
@@ -160,7 +160,7 @@ func (tp *TestSuite) TestPinRecursive(t *testing.T) {
...
@@ -160,7 +160,7 @@ func (tp *TestSuite) TestPinRecursive(t *testing.T) {
}
}
if
list
[
0
]
.
Path
()
.
String
()
!=
path
.
IpldPath
(
nd3
.
Cid
())
.
String
()
{
if
list
[
0
]
.
Path
()
.
String
()
!=
path
.
IpldPath
(
nd3
.
Cid
())
.
String
()
{
t
.
Errorf
(
"unexpected path, %s != %s"
,
list
[
0
]
.
Path
()
.
String
(),
path
.
IpfsPath
(
nd
2
.
Cid
())
.
String
())
t
.
Errorf
(
"unexpected path, %s != %s"
,
list
[
0
]
.
Path
()
.
String
(),
path
.
IpfsPath
(
nd
3
.
Cid
())
.
String
())
}
}
list
,
err
=
accPins
(
api
.
Pin
()
.
Ls
(
ctx
,
opt
.
Pin
.
Type
.
Recursive
()))
list
,
err
=
accPins
(
api
.
Pin
()
.
Ls
(
ctx
,
opt
.
Pin
.
Type
.
Recursive
()))
...
@@ -173,7 +173,7 @@ func (tp *TestSuite) TestPinRecursive(t *testing.T) {
...
@@ -173,7 +173,7 @@ func (tp *TestSuite) TestPinRecursive(t *testing.T) {
}
}
if
list
[
0
]
.
Path
()
.
String
()
!=
path
.
IpldPath
(
nd2
.
Cid
())
.
String
()
{
if
list
[
0
]
.
Path
()
.
String
()
!=
path
.
IpldPath
(
nd2
.
Cid
())
.
String
()
{
t
.
Errorf
(
"unexpected path, %s != %s"
,
list
[
0
]
.
Path
()
.
String
(),
path
.
IpldPath
(
nd
3
.
Cid
())
.
String
())
t
.
Errorf
(
"unexpected path, %s != %s"
,
list
[
0
]
.
Path
()
.
String
(),
path
.
IpldPath
(
nd
2
.
Cid
())
.
String
())
}
}
list
,
err
=
accPins
(
api
.
Pin
()
.
Ls
(
ctx
,
opt
.
Pin
.
Type
.
Indirect
()))
list
,
err
=
accPins
(
api
.
Pin
()
.
Ls
(
ctx
,
opt
.
Pin
.
Type
.
Indirect
()))
...
@@ -186,7 +186,7 @@ func (tp *TestSuite) TestPinRecursive(t *testing.T) {
...
@@ -186,7 +186,7 @@ func (tp *TestSuite) TestPinRecursive(t *testing.T) {
}
}
if
list
[
0
]
.
Path
()
.
Cid
()
.
String
()
!=
p0
.
Cid
()
.
String
()
{
if
list
[
0
]
.
Path
()
.
Cid
()
.
String
()
!=
p0
.
Cid
()
.
String
()
{
t
.
Error
(
"unexpected path
"
)
t
.
Error
f
(
"unexpected path
, %s != %s"
,
list
[
0
]
.
Path
()
.
Cid
()
.
String
(),
p0
.
Cid
()
.
String
()
)
}
}
res
,
err
:=
api
.
Pin
()
.
Verify
(
ctx
)
res
,
err
:=
api
.
Pin
()
.
Verify
(
ctx
)
...
...
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