752fb2e2c0
Text Extraction Clean Up + Parallelization * merged_Call * directchildren * bitofimprovements * go * parallel * fixfullsuite * pondforconcurrency * comments * muchdone * bitsofclean * stabilisedtests * snappy * threadpooltests * childelements * testspassed
43 lines
844 B
Go
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()
|
|
}
|