Files
query-orchestration/internal/test/api_test.go
T

34 lines
676 B
Go
Raw Normal View History

package test_test
import (
2025-03-05 12:05:46 +00:00
"testing"
"queryorchestration/internal/serviceconfig"
"queryorchestration/internal/test"
"github.com/stretchr/testify/assert"
)
func TestCreateAPI(t *testing.T) {
2025-04-25 17:02:50 +00:00
t.Parallel()
if testing.Short() {
t.Skip("Skipping long test in short mode")
}
ctx := t.Context()
cfg := &serviceconfig.BaseConfig{}
2025-04-25 17:02:50 +00:00
_ = serviceconfig.InitializeConfig(cfg)
net := test.DepNetwork.Get(t, ctx)
2025-04-25 17:02:50 +00:00
_ = 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()
}