I am trying to configure a Test container as described on this website. testcontainers
I am having trouble configuring it with DockerCompose. I am looking at the docs and I don't see what I am doing wrong. What is the correct way to configure DockerComposeContainer for the sake of junit testing?
Right now I keep getting an error
org.testcontainers.containers.ContainerLaunchException
Which is happening because the timeout expires. This is what the code looks like.
private final DockerComposeContainer environment = new DockerComposeContainer(new File(path))
.withLogConsumer("localstack", logConsumer)
.waitingFor("localstack", Wait.forHttp("http://localhost:4572")
.forStatusCode(200)
.withStartupTimeout(Duration.ofSeconds(90)));
If I sit there with postman while it is starting, I can hit that endpoint and get a 200 response with postman indicating that localstack has started up correctly. But DockerComposeContainer doesn't seem to pick it up. What's wrong here? What is the right way to do this?