Skip to content

Commit

Permalink
use nginx when possible when writing test
Browse files Browse the repository at this point in the history
We have to do our best to keep the number of images overall the test
suite as small as possible, to speed up the testsuite itself.
  • Loading branch information
Gianluca Arbezzano committed Jun 16, 2020
1 parent b13233d commit 2d631fb
Showing 1 changed file with 4 additions and 7 deletions.
11 changes: 4 additions & 7 deletions container_test.go
Original file line number Diff line number Diff line change
Expand Up @@ -319,12 +319,9 @@ func TestShouldStartContainersInParallel(t *testing.T) {

func createTestContainer(t *testing.T, ctx context.Context) int {
req := ContainerRequest{
Image: "localstack/localstack:latest",
ExposedPorts: []string{"4584/tcp", "8080/tcp"},
Env: map[string]string{
"SERVICES": "secretsmanager",
},
WaitingFor: wait.ForListeningPort("4584/tcp"),
Image: "nginx",
ExposedPorts: []string{"80/tcp"},
WaitingFor: wait.ForHTTP("/"),
}
container, err := GenericContainer(ctx, GenericContainerRequest{
ContainerRequest: req,
Expand All @@ -333,7 +330,7 @@ func createTestContainer(t *testing.T, ctx context.Context) int {
if err != nil {
t.Fatalf("could not start container: %v", err)
}
port, err := container.MappedPort(ctx, "4584")
port, err := container.MappedPort(ctx, "80")
if err != nil {
t.Fatalf("could not get mapped port: %v", err)
}
Expand Down

0 comments on commit 2d631fb

Please sign in to comment.