fee71e7740
Feature/postprocessing * tests * passtest * fixshorttests * mosttests * improvingbasedockerfile * testspeeds * testing * host * canparallel * clean * passfullsuite * singlepagemax * test * findfeatures * findstables * tbls * tablestoo * tablestoo * lateraltests * tableloc * cleanup * inlinetable * childids * cleanup * tests
44 lines
895 B
Go
44 lines
895 B
Go
package test_test
|
|
|
|
import (
|
|
"context"
|
|
"testing"
|
|
|
|
"queryorchestration/internal/serviceconfig"
|
|
"queryorchestration/internal/test"
|
|
|
|
"github.com/stretchr/testify/assert"
|
|
)
|
|
|
|
func TestCreateDB(t *testing.T) {
|
|
if testing.Short() {
|
|
t.Skip("Skipping long test in short mode")
|
|
}
|
|
ctx := context.Background()
|
|
|
|
cfg := &serviceconfig.BaseConfig{}
|
|
|
|
net := test.DepNetwork.Get(t, ctx)
|
|
dbcfg := test.CreateDB(t, ctx, cfg, net, &test.CreateDatabaseConfig{})
|
|
|
|
assert.NotNil(t, dbcfg)
|
|
assert.Nil(t, cfg.GetDBPool())
|
|
}
|
|
|
|
func TestCreateDBWithMigrations(t *testing.T) {
|
|
if testing.Short() {
|
|
t.Skip("Skipping long test in short mode")
|
|
}
|
|
ctx := context.Background()
|
|
|
|
cfg := &serviceconfig.BaseConfig{}
|
|
|
|
net := test.DepNetwork.Get(t, ctx)
|
|
dbcfg := test.CreateDB(t, ctx, cfg, net, &test.CreateDatabaseConfig{
|
|
RunMigrations: true,
|
|
})
|
|
|
|
assert.NotNil(t, dbcfg)
|
|
assert.NotNil(t, cfg.GetDBPool())
|
|
}
|