Files
query-orchestration/internal/test/container_test.go
T
Michael McGuinness 752fb2e2c0 Merged in feature/chc_1 (pull request #120)
Text Extraction Clean Up + Parallelization

* merged_Call

* directchildren

* bitofimprovements

* go

* parallel

* fixfullsuite

* pondforconcurrency

* comments

* muchdone

* bitsofclean

* stabilisedtests

* snappy

* threadpooltests

* childelements

* testspassed
2025-04-25 17:02:50 +00:00

43 lines
844 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) {
t.Parallel()
if testing.Short() {
t.Skip("Skipping long test in short mode")
}
ctx := context.Background()
cfg := &serviceconfig.BaseConfig{}
net := DepNetwork.Get(t, ctx)
_ = CreateDB(t, ctx, cfg, net, &CreateDatabaseConfig{NoMigrations: true})
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()
}