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
d2f36ede
Unverified
Commit
d2f36ede
authored
Jan 23, 2020
by
Steven Allen
Committed by
GitHub
Jan 23, 2020
Browse files
Options
Browse Files
Download
Plain Diff
Merge pull request #57 from MichaelMure/fatal-on-err
test: fail early on err to avoid an unrelated panic
parents
7bbf5bb0
df21c57e
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 @
d2f36ede
...
@@ -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