testcontainers-go
testcontainers-go copied to clipboard
Add option for custom network name prefix
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')