Skip to content
Projects
Groups
Snippets
Help
Loading...
Sign in
Toggle navigation
D
dex
Project
Project
Details
Activity
Cycle Analytics
Repository
Repository
Files
Commits
Branches
Tags
Contributors
Graph
Compare
Charts
Issues
0
Issues
0
List
Board
Labels
Milestones
Merge Requests
0
Merge Requests
0
Wiki
Wiki
Snippets
Snippets
Members
Members
Collapse sidebar
Close sidebar
Activity
Graph
Charts
Create a new issue
Commits
Issue Boards
Open sidebar
go
dex
Commits
449f34ed
Commit
449f34ed
authored
Oct 13, 2016
by
Eric Chiang
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
storage/sql: print error before calling t.Fatal
parent
4296604f
Show whitespace changes
Inline
Side-by-side
Showing
1 changed file
with
10 additions
and
5 deletions
+10
-5
config_test.go
storage/sql/config_test.go
+10
-5
No files found.
storage/sql/config_test.go
View file @
449f34ed
...
...
@@ -72,15 +72,20 @@ func TestPostgres(t *testing.T) {
},
ConnectionTimeout
:
5
,
}
conn
,
err
:=
p
.
open
()
if
err
!=
nil
{
t
.
Fatal
(
err
)
// t.Fatal has a bad habbit of not actually printing the error
fatal
:=
func
(
i
interface
{})
{
fmt
.
Fprintln
(
os
.
Stdout
,
i
)
t
.
Fatal
(
i
)
}
defer
conn
.
Close
()
newStorage
:=
func
()
storage
.
Storage
{
conn
,
err
:=
p
.
open
()
if
err
!=
nil
{
fatal
(
err
)
}
if
err
:=
cleanDB
(
conn
);
err
!=
nil
{
t
.
F
atal
(
err
)
f
atal
(
err
)
}
return
conn
}
...
...
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