testcontainers-go
testcontainers-go copied to clipboard
[Enhancement]: Provide a possibility to use keep containers running
Proposal
If container-startup is slow, frequent test runs pose difficulties. Hence, it's advantageous to maintain container operations throughout the testing process.
Currently, we utilize the reuse
function and continuously execute one test in debug mode, eliminating the need for containers. Initiate your dev environment and existing containers will be employed, speeding up execution.
A more inherent support would be ideal.
Suggestion:
Permit setting of ryuk "kill" duration (RYUK_RECONNECTION_TIMEOUT). If set high, containers should terminate if idle for x minutes. This enables container cleanup and reuses the existing container for frequent tests. If inactive longer, they'll be cleaned, necessitating a lengthier startup.
Despite seeming feasible, I've found no mention in the docs or testcontainers-go's configuration API. I'm keen to contribute if implementation is needed. I'd appreciate your input and ensure I'm not overlooking anything.
Thanks in advance.