5ca36b0502
Feature/listtypes * started * cleanuplist * someunittestfixes * removemostflakiness
26 lines
490 B
Go
26 lines
490 B
Go
package database_test
|
|
|
|
import (
|
|
"context"
|
|
"os"
|
|
"path"
|
|
"queryorchestration/internal/database"
|
|
"queryorchestration/internal/test"
|
|
"testing"
|
|
|
|
"github.com/stretchr/testify/assert"
|
|
)
|
|
|
|
func TestDBConn(t *testing.T) {
|
|
ctx := context.Background()
|
|
_, cleanup := test.CreateDB(t, ctx, &test.CreateDatabaseConfig{
|
|
Migrations: &database.MigrationConfig{
|
|
BasePath: path.Join(os.Getenv("PWD"), "../.."),
|
|
},
|
|
})
|
|
defer cleanup()
|
|
|
|
pool := database.GetDBPool(ctx)
|
|
assert.NotNil(t, pool)
|
|
}
|