Initial cloud-services repo - gateway service + pkg modules
This commit is contained in:
24
pkg/db/db_test.go
Normal file
24
pkg/db/db_test.go
Normal file
@@ -0,0 +1,24 @@
|
||||
package db_test
|
||||
|
||||
import (
|
||||
"testing"
|
||||
|
||||
"github.com/go-pg/pg/v10"
|
||||
|
||||
m "fiskerinc.com/modules/common"
|
||||
"fiskerinc.com/modules/db"
|
||||
"fiskerinc.com/modules/testhelper"
|
||||
)
|
||||
|
||||
func TestDBClient(t *testing.T) {
|
||||
client := db.DBClient{}
|
||||
client.SetConn(pg.Connect(&pg.Options{}))
|
||||
defer client.Close()
|
||||
|
||||
err := client.InitSchema([]interface{}{
|
||||
(*m.Car)(nil),
|
||||
})
|
||||
if err == nil {
|
||||
t.Errorf(testhelper.TestErrorTemplate, "TestDBCreateSchema", "error", err)
|
||||
}
|
||||
}
|
||||
Reference in New Issue
Block a user