Skip to content

Commit

Permalink
[+] add tests for pgengine.FinalizeConfigDBConnection() function
Browse files Browse the repository at this point in the history
  • Loading branch information
pashagolub committed Jul 1, 2020
1 parent 749f999 commit 6eeae0a
Showing 1 changed file with 7 additions and 0 deletions.
7 changes: 7 additions & 0 deletions internal/pgengine/bootstrap_test.go
Expand Up @@ -121,3 +121,10 @@ func TestLogger(t *testing.T) {
l.Log(context.Background(), pgx.LogLevel(level), "", nil)
}
}

func TestFinalizeConnection(t *testing.T) {
initmockdb(t)
pgengine.ConfigDb = xdb
mock.ExpectClose().WillReturnError(errors.New("expected"))
pgengine.FinalizeConfigDBConnection()
}

0 comments on commit 6eeae0a

Please sign in to comment.