Merged in bugfix/cleanup (pull request #10)
Clean Up Testing and Linting * somescriptcleanup * mostgolangci * deplatest * imageversions * usingscratch * movedqueuefrtesting * finishedunittesting * linting * taskfilecontext
This commit is contained in:
@@ -32,7 +32,7 @@ func createQueueContainer(t *testing.T, ctx context.Context, config *queueContai
|
||||
}
|
||||
|
||||
req := testcontainers.ContainerRequest{
|
||||
Image: fmt.Sprintf("queryorchestration_%s:latest", config.ServiceName),
|
||||
Image: "queryorchestration:latest",
|
||||
Env: map[string]string{
|
||||
"QUEUE_URL": config.Queue.URL,
|
||||
"AWS_DEFAULT_REGION": config.Queue.Region,
|
||||
@@ -46,8 +46,11 @@ func createQueueContainer(t *testing.T, ctx context.Context, config *queueContai
|
||||
"DB_HOST": config.DB.Host,
|
||||
"DB_NAME": config.DB.Name,
|
||||
"DB_PORT": strconv.Itoa(config.DB.Port),
|
||||
"DB_NOSSL": "1",
|
||||
},
|
||||
Networks: []string{config.Network.Name},
|
||||
Networks: []string{config.Network.Name},
|
||||
WaitingFor: wait.ForLog("Listening to queue"),
|
||||
Entrypoint: []string{fmt.Sprintf("./bin/%s", config.ServiceName)},
|
||||
}
|
||||
|
||||
container, err := testcontainers.GenericContainer(ctx, testcontainers.GenericContainerRequest{
|
||||
@@ -86,7 +89,7 @@ func createQueue(t *testing.T, ctx context.Context, network *testcontainers.Dock
|
||||
}
|
||||
|
||||
req := testcontainers.ContainerRequest{
|
||||
Image: "localstack/localstack:latest",
|
||||
Image: "localstack/localstack:4.0.3",
|
||||
Env: map[string]string{
|
||||
"AWS_ACCESS_KEY_ID": provider.Value.AccessKeyID,
|
||||
"AWS_SECRET_ACCESS_KEY": provider.Value.SecretAccessKey,
|
||||
@@ -210,8 +213,20 @@ func createQueueDependencies(t *testing.T, ctx context.Context, serviceName stri
|
||||
|
||||
return queue, func() {
|
||||
testcontainers.CleanupNetwork(t, network)
|
||||
dbContainer.Terminate(ctx)
|
||||
(*queue.Container).Terminate(ctx)
|
||||
container.Terminate(ctx)
|
||||
|
||||
err := dbContainer.Terminate(ctx)
|
||||
if err != nil {
|
||||
t.Error(err)
|
||||
}
|
||||
|
||||
err = (*queue.Container).Terminate(ctx)
|
||||
if err != nil {
|
||||
t.Error(err)
|
||||
}
|
||||
|
||||
err = container.Terminate(ctx)
|
||||
if err != nil {
|
||||
t.Error(err)
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
Reference in New Issue
Block a user