Skip to content

Commit

Permalink
test case - minor fix
Browse files Browse the repository at this point in the history
  • Loading branch information
ABresting committed Sep 5, 2021
1 parent ab15bb6 commit 9264087
Showing 1 changed file with 4 additions and 2 deletions.
6 changes: 4 additions & 2 deletions test/internal/database/database_test.go
Expand Up @@ -15,8 +15,8 @@ import (
// Keep in mind this function requires the role `superuser` and the `superuser` db
// to previously exists!
// Example:
// $ # create the user as a superuser and password as password
// $ db.createUser( { user: "superuser", pwd: "password", roles: ["readWriteAnyDatabase" ] } )
// $ # create the user as a superuser and password as password under admin db
// $ db.createUser( { user: "superuser", pwd: "password", roles: ["root" ] } )

func TestDatabaseConnection(t *testing.T) {

Expand Down Expand Up @@ -48,6 +48,7 @@ func TestDatabaseConnection(t *testing.T) {
if conn == nil{
t.Error("Error connecting database")
}
defer conn.Disconnect(context.TODO())
}

func TestDatabaseInsert(t *testing.T) {
Expand Down Expand Up @@ -126,6 +127,7 @@ func TestDatabaseInsert(t *testing.T) {
}

defer cancel()
defer conn.Disconnect(context.TODO())
} else {
t.Error("Database not accessible")
}
Expand Down

0 comments on commit 9264087

Please sign in to comment.