15adaebfcd
DRAFT PR : WIP working through ideas for integration * movearound * attempttwo * openapi * further sanding * fix * start on tests * runthroughsingleconfig * somechanges * reflectissue * removeerrs * mostlyremovepanic * removeenv * noncfgtests * go * repo * fix service config test * add PWD to all * test fix * fix lint * todo for later * passingunittests * alltests * testlogger * testloggername * clean
19 lines
345 B
Go
19 lines
345 B
Go
package migrations
|
|
|
|
import (
|
|
"queryorchestration/internal/serviceconfig"
|
|
"testing"
|
|
|
|
"github.com/stretchr/testify/assert"
|
|
)
|
|
|
|
func TestCreateDB(t *testing.T) {
|
|
t.Setenv("DB_HOST", "invalid_value")
|
|
cfg := &serviceconfig.BaseConfig{}
|
|
err := serviceconfig.InitializeConfig(cfg)
|
|
assert.Nil(t, err)
|
|
|
|
err = createDB(cfg)
|
|
assert.Error(t, err)
|
|
}
|