You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
When running a test suite with @Testcontainers, docker ps shows containers with auto-generated names like tc-hs89alkj27d-postgres. There's no way to tell which container belongs to which test without cross-referencing container IDs against test output.
Proposal
Set two Docker labels on every container started via @testcontainers:
reacted with thumbs up emoji reacted with thumbs down emoji reacted with laugh emoji reacted with hooray emoji reacted with confused emoji reacted with heart emoji reacted with rocket emoji reacted with eyes emoji
Uh oh!
There was an error while loading. Please reload this page.
Uh oh!
There was an error while loading. Please reload this page.
-
Problem
When running a test suite with
@Testcontainers,docker psshows containers with auto-generated names liketc-hs89alkj27d-postgres. There's no way to tell which container belongs to which test without cross-referencing container IDs against test output.Proposal
Set two Docker labels on every container started via @testcontainers:
These labels are set in the JUnit extension's
StoreAdapter.start()before callingcontainer.start(). They use the public withLabel() API.What it enables
docker ps --filter label=testcontainers/test-class=com.example.MyPostgresTestQuestions for the maintainers
testcontainers/prefix acceptable, or would you prefer a different namespace?@Testcontainers(enableLabels=true)attribute, or always-on?Beta Was this translation helpful? Give feedback.
All reactions