Skip to content

Commit

Permalink
improve tests
Browse files Browse the repository at this point in the history
  • Loading branch information
ilgooz committed Nov 1, 2018
1 parent 9ed97b2 commit 99eb632
Show file tree
Hide file tree
Showing 2 changed files with 6 additions and 6 deletions.
2 changes: 1 addition & 1 deletion api/api_test.go
Original file line number Diff line number Diff line change
Expand Up @@ -28,7 +28,7 @@ func newAPIAndDockerTest(t *testing.T) (*API, *dockertest.Testing, func()) {
require.NoError(t, err)

a, err := New(db, execDB, ContainerOption(container))
require.Nil(t, err)
require.NoError(t, err)

closer := func() {
require.NoError(t, db.Close())
Expand Down
10 changes: 5 additions & 5 deletions interface/grpc/service/service_test.go
Original file line number Diff line number Diff line change
Expand Up @@ -31,15 +31,15 @@ func newServer(t *testing.T) (*Server, func()) {
require.NoError(t, err)

a, err := api.New(db, execDB)
require.Nil(t, err)
require.NoError(t, err)

server := NewServer(a)

closer := func() {
db.Close()
execDB.Close()
os.RemoveAll(servicedbname)
os.RemoveAll(execdbname)
require.NoError(t, db.Close())
require.NoError(t, execDB.Close())
require.NoError(t, os.RemoveAll(servicedbname))
require.NoError(t, os.RemoveAll(execdbname))
}

return server, closer
Expand Down

0 comments on commit 99eb632

Please sign in to comment.