-
-
Notifications
You must be signed in to change notification settings - Fork 512
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
[Enhancement]: Reuse flag for module Postgres #2726
Comments
I still need the setupBaseDatabase() function in Singletone, so I don't need the flag. |
OK, we have .WithInitScripts() for initialization. Then the feature request is relevant again. |
Hi @comerc so you'd see valuable having a |
This can already be easily achieved using reuse := testcontainers.CustomizeRequestOption(
func(req *testcontainers.GenericContainerRequest) error {
req.Reuse = true
return nil
},
)
postgress.Run(ctx, "docker.io/postgres:16-alpine", reuse) |
please remember that we'd also need the container name for reuse (see https://golang.testcontainers.org/features/creating_container/#reusable-container):
|
@comerc given there is a way to customise the request with Reuse, I think you can make progress. I'd appreciate your feedback about that and with that feedback evaluate if a specific functional option is needed for that. Thanks! |
I think #2768 will solve this. Would appreciate your review 🙏 |
Proposal
Like
GenericContainerRequest
:The text was updated successfully, but these errors were encountered: