testcontainers-go icon indicating copy to clipboard operation
testcontainers-go copied to clipboard

Add option for custom network name prefix

Open mdelapenya opened this issue 1 year ago • 0 comments

Discussed in https://github.com/testcontainers/testcontainers-go/discussions/2123

Originally posted by oktalz January 17, 2024 Hi. new API for network does not allow custom name for network, if running multiple tests, its hard to differentiate what test is using what network. especially if more that one project is running tests. this is also important for stats collection... etc.

Also, ryuk have some issues with deleting networks (in many occasions), so while its easy to see with labels what is what, manually is more work.

While this is irrelevant in most cases and we have labels, its much nicer to have distinction between projects/tests.

Would adding a WithPrefix or and WithName to the api cause some issue and does it seems interesting ? like network.WithPrefix('proj_name')

mdelapenya avatar Jun 18 '24 15:06 mdelapenya