Files
query-orchestration/internal/test/api_test.go
T
Michael McGuinness dd2eebf13a Merged in feature/testingopts (pull request #129)
Testing Options and Clean Up

* bitsandbobs

* lint

* healthchecks

* imgintests

* singlegenerate

* testclean

* network

* networkclean

* cmds
2025-05-03 01:16:53 +00:00

34 lines
645 B
Go

package test_test
import (
"testing"
"queryorchestration/internal/serviceconfig"
"queryorchestration/internal/test"
"github.com/stretchr/testify/assert"
)
func TestCreateAPI(t *testing.T) {
t.Parallel()
if testing.Short() {
t.SkipNow()
}
ctx := t.Context()
cfg := &serviceconfig.BaseConfig{}
_ = serviceconfig.InitializeConfig(cfg)
net := test.DepNetwork.Get(t, ctx)
_ = test.CreateDB(t, ctx, cfg, net, &test.CreateDatabaseConfig{NoMigrations: true})
acfg := &test.APIConfig{
API: test.QueryAPI,
}
conn, cleanup := test.CreateAPI(t, ctx, cfg, net, acfg)
assert.NotNil(t, conn)
assert.NotNil(t, cleanup)
cleanup()
}