testcontainers / testcontainers/testcontainers-java
Question: Should containers/networks be pruned after failed tests?
Nobody has claimed this yet.
- Dominant language
- Java
- Stars
- 8.7k
- Forks
- 1.9k
- Avg merge
- 2d 17h
- Merged PRs (30d)
- 9
Description
Hi all, appologies if this is a totally stupid question. I just started to work on a project that uses testcontainers for integration testing. Unfortunately on my Mac the tests all fail, whereas they succeed for other. In my case the fail because of
11:32:45.603 [Test worker] ERROR ?? [alpine/socat:latest] - Could not start container
org.testcontainers.containers.ContainerLaunchException: Aborting attempt to link to container SOME_CONTAINER as it is not running
When I use 'docker-machine ls' , 'docker container ls' and 'docker network ls' after the failed test, the docker machine is still running, as well as the containers are.
I wonder if the containers and network should have been stopped and pruned after the failed test. They seem to be stopped and pruned if the test succeed.
Software used:
testcontainers: 1.7.1
Docker vor Mac: 18.03.1-ce-mac65
Docker compose: 1.21.1
Docker machine: 0.14.0
Virtual Box: 5.1.2
I already queried the docs/how to, but I could not really find a hint.
Thanks for any pointers!
Contributor guide
First steps
- Read the whole issue, then the project's contributing guide.
- Comment on the issue to say you are picking it up — it saves two people doing the same work.
- Fork the repository and make your change on a branch.
- Open a pull request that references the issue number.
Research direction
No project file or specific test is named. Start by reproducing the reported integration-test failure with the listed Testcontainers and Docker versions, then inspect the cleanup behavior after a failed test; done means determining whether the containers and network should be stopped and pruned and documenting or correcting that behavior.
Written by the indexing model from the issue text.
Assessment
- Tech stack
- docker, java
- Domain
- devops, testing
- Issue type
- Bug
- Difficulty
- 3/5
- Estimated time
- 1-2 days
- Activity status
- Stale
- Clarity
- Needs clarification
- Newbie friendliness
- 25/100