Skip to content

Commit

Permalink
Merge pull request #213 from testcontainers/fix/use-nginx-image-where…
Browse files Browse the repository at this point in the history
…-possible

use nginx when possible when writing test
  • Loading branch information
gianarb authored Jun 16, 2020
2 parents b13233d + 2d631fb commit 123ab0b
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 123ab0b

Please sign in to comment.