Files
query-orchestration/internal/test/api_test.go
T
Michael McGuinness 81e7223560 Merged in feature/textextraction (pull request #110)
Text Extraction

* bases

* go

* splitting

* structure

* movetoasync

* movetoasync

* settinguptrigger

* reorder

* storevent

* standardisepollingvalidation

* unittests

* fixlint

* fixlint

* awscfg

* generatesample

* followthrough

* tests

* clena

* store

* externalidcleanup

* clientid

* local

* baseunittests

* putobjecttests

* tests
2025-04-02 18:50:03 +00:00

40 lines
742 B
Go

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()
}