package test_test import ( "context" "testing" "queryorchestration/internal/serviceconfig" "queryorchestration/internal/test" "github.com/stretchr/testify/assert" ) func TestCreateAPI(t *testing.T) { if testing.Short() { t.Skip("Skipping long test in short mode") } ctx := context.Background() ncfg, ncleanup := test.CreateNetwork(t, ctx) defer ncleanup() cfg := &serviceconfig.BaseConfig{} test.SetCfgProvider(t, cfg) _, dbcleanup := test.CreateDB(t, ctx, cfg, &test.CreateDatabaseConfig{ Network: ncfg, }) defer dbcleanup() acfg := &test.APIConfig{ API: test.QueryAPI, Network: ncfg, } conn, cleanup := test.CreateAPI(t, ctx, cfg, acfg) assert.NotNil(t, conn) assert.NotNil(t, cleanup) cleanup() }