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
This commit is contained in:
@@ -24,7 +24,6 @@ type Container struct {
|
||||
type containerConfig struct {
|
||||
Name string
|
||||
Cfg serviceconfig.ConfigProvider
|
||||
Network *testcontainers.DockerNetwork
|
||||
DownstreamQueues []RunnerName
|
||||
Env map[string]string
|
||||
WaitForMsg string
|
||||
@@ -32,21 +31,23 @@ type containerConfig struct {
|
||||
MockHTTP string
|
||||
}
|
||||
|
||||
func createContainer(t testing.TB, ctx context.Context, cfg *containerConfig) (testcontainers.Container, func()) {
|
||||
func createContainer(t testing.TB, ctx context.Context, network string, cfg *containerConfig) (testcontainers.Container, func()) {
|
||||
awsAlias := NormaliseAlias(fmt.Sprintf("%s_%s", awsAlias, t.Name()))
|
||||
awsEndpoint := fmt.Sprintf("http://%s:%d", awsAlias, awsPort)
|
||||
env := map[string]string{
|
||||
"PGUSER": cfg.Cfg.GetDBUser(),
|
||||
"PGPASSWORD": cfg.Cfg.GetDBSecret(),
|
||||
"PGHOST": cfg.Cfg.GetDBHost(),
|
||||
"PGHOST": dbAlias,
|
||||
"PGDATABASE": cfg.Cfg.GetDBName(),
|
||||
"PGPORT": strconv.Itoa(cfg.Cfg.GetDBPort()),
|
||||
"PGPORT": strconv.Itoa(dbPort),
|
||||
"DB_NOSSL": strconv.FormatBool(cfg.Cfg.IsDBNoSSL()),
|
||||
"AWS_ACCESS_KEY_ID": cfg.Cfg.GetAWSKeyID(),
|
||||
"AWS_SECRET_ACCESS_KEY": cfg.Cfg.GetAWSSecretKey(),
|
||||
"AWS_REGION": cfg.Cfg.GetAWSRegion(),
|
||||
"AWS_DEFAULT_REGION": cfg.Cfg.GetAWSRegion(),
|
||||
"AWS_ENDPOINT_URL": cfg.Cfg.GetAWSEndpoint(),
|
||||
"AWS_ENDPOINT_URL_SQS": cfg.Cfg.GetAWSEndpoint(),
|
||||
"AWS_ENDPOINT_URL_S3": cfg.Cfg.GetAWSEndpoint(),
|
||||
"AWS_ENDPOINT_URL": awsEndpoint,
|
||||
"AWS_ENDPOINT_URL_SQS": awsEndpoint,
|
||||
"AWS_ENDPOINT_URL_S3": awsEndpoint,
|
||||
"AWS_ENDPOINT_URL_TEXTRACT": cfg.MockHTTP,
|
||||
"AWS_S3_USE_PATH_STYLE": strconv.FormatBool(true),
|
||||
"LOG_LEVEL": "DEBUG",
|
||||
@@ -64,9 +65,9 @@ func createContainer(t testing.TB, ctx context.Context, cfg *containerConfig) (t
|
||||
req := testcontainers.ContainerRequest{
|
||||
Image: "queryorchestration:latest",
|
||||
Env: env,
|
||||
Networks: []string{cfg.Network.Name},
|
||||
WaitingFor: wait.ForLog(cfg.WaitForMsg),
|
||||
Entrypoint: []string{fmt.Sprintf("./%s", cfg.Name)},
|
||||
Networks: []string{network},
|
||||
}
|
||||
|
||||
if len(cfg.ExposedPorts) > 0 {
|
||||
|
||||
Reference in New Issue
Block a user