-
Notifications
You must be signed in to change notification settings - Fork 39
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
initSQL for postgres container #164
Comments
Hi @kaning! It’s similar to a request here testcontainers/testcontainers-rs#669 (you can find a workaround there for now) We need to consider adding this functionality for database-modules (like in Java). At least for a subset of modules. At least, under a separate feature (if we will need to involve |
Thank you for the response... I'll try that workaround |
I don't think we need to close the issue. Because it seems to be a common use-case and we still need to consider/add this functionality |
Should
or
|
I think it should be |
Feature request description
When running a test container, sometimes you might want to create a schema, user, role on the database before running your tests.
I believe you we have the
.with_user
, and.with_password
options. Is it possible to have a.with_initsql
method on the Postgres implementation that executes arbitrary SQL scripts on the database on start up?Image reference
[dev-dependencies]
testcontainers = "0.20.0"
testcontainers-modules = { version = "0.8.0", features = ["postgres"] }
The text was updated successfully, but these errors were encountered: