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
df21c57e
Unverified
Commit
df21c57e
authored
Jan 22, 2020
by
Michael Muré
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
test: fail early on err to avoid an unrelated panic
parent
7bbf5bb0
Changes
1
Hide whitespace changes
Inline
Side-by-side
Showing
1 changed file
with
2 additions
and
2 deletions
+2
-2
tests/block.go
tests/block.go
+2
-2
No files found.
tests/block.go
View file @
df21c57e
...
@@ -156,7 +156,7 @@ func (tp *TestSuite) TestBlockRm(t *testing.T) {
...
@@ -156,7 +156,7 @@ func (tp *TestSuite) TestBlockRm(t *testing.T) {
_
,
err
=
api
.
Block
()
.
Get
(
ctx
,
res
.
Path
())
_
,
err
=
api
.
Block
()
.
Get
(
ctx
,
res
.
Path
())
if
err
==
nil
{
if
err
==
nil
{
t
.
Error
(
"expected err to exist"
)
t
.
Fatal
(
"expected err to exist"
)
}
}
if
!
strings
.
Contains
(
err
.
Error
(),
"blockservice: key not found"
)
{
if
!
strings
.
Contains
(
err
.
Error
(),
"blockservice: key not found"
)
{
t
.
Errorf
(
"unexpected error; %s"
,
err
.
Error
())
t
.
Errorf
(
"unexpected error; %s"
,
err
.
Error
())
...
@@ -164,7 +164,7 @@ func (tp *TestSuite) TestBlockRm(t *testing.T) {
...
@@ -164,7 +164,7 @@ func (tp *TestSuite) TestBlockRm(t *testing.T) {
err
=
api
.
Block
()
.
Rm
(
ctx
,
res
.
Path
())
err
=
api
.
Block
()
.
Rm
(
ctx
,
res
.
Path
())
if
err
==
nil
{
if
err
==
nil
{
t
.
Error
(
"expected err to exist"
)
t
.
Fatal
(
"expected err to exist"
)
}
}
if
!
strings
.
Contains
(
err
.
Error
(),
"blockstore: block not found"
)
{
if
!
strings
.
Contains
(
err
.
Error
(),
"blockstore: block not found"
)
{
t
.
Errorf
(
"unexpected error; %s"
,
err
.
Error
())
t
.
Errorf
(
"unexpected 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