Files
query-orchestration/internal/test/container_test.go
T
Michael McGuinness fee71e7740 Merged in feature/postprocessing (pull request #114)
Feature/postprocessing

* tests

* passtest

* fixshorttests

* mosttests

* improvingbasedockerfile

* testspeeds

* testing

* host

* canparallel

* clean

* passfullsuite

* singlepagemax

* test

* findfeatures

* findstables

* tbls

* tablestoo

* tablestoo

* lateraltests

* tableloc

* cleanup

* inlinetable

* childids

* cleanup

* tests
2025-04-22 14:40:16 +00:00

43 lines
836 B
Go

package test
import (
"context"
"testing"
"queryorchestration/internal/serviceconfig"
"github.com/docker/go-connections/nat"
"github.com/stretchr/testify/assert"
)
func TestCreateContainer(t *testing.T) {
if testing.Short() {
t.Skip("Skipping long test in short mode")
}
ctx := context.Background()
cfg := &serviceconfig.BaseConfig{}
SetCfgProvider(t, cfg)
net := DepNetwork.Get(t, ctx)
_ = CreateDB(t, ctx, cfg, net, &CreateDatabaseConfig{})
ccfg := &containerConfig{
Name: string(QueryAPIName),
DownstreamQueues: QueryAPI.DownstreamQueues,
Cfg: cfg,
ExposedPorts: []nat.Port{
nat.Port("8080/tcp"),
},
}
container, cleanup := createContainer(t, ctx, net, ccfg)
assert.NotNil(t, container)
assert.NotNil(t, cleanup)
PrintContainerLogs(t, ctx, container)
cleanup()
}