We read every piece of feedback, and take your input very seriously.
To see all available qualifiers, see our documentation.
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
The new DevServices stuff in 1.13 is awesome! It would be really nice to be able to pass additional parameters directly to testcontainers.
For example:
quarkus.datasource.devservices.image-name=postgres:13 quarkus.datasource.devservices.properties.TC_INITSCRIPT=db/schema.sql
where in src/main/resources/db there is a schema.sql file that creates the schema.
src/main/resources/db
schema.sql
See the Using a classpath init script section from https://www.testcontainers.org/modules/databases/jdbc/
Right now I'm doing this:
%test.quarkus.datasource.jdbc.url=jdbc:tc:postgresql:13:///mydb?TC_INITSCRIPT=db/schema.sql %test.quarkus.datasource.jdbc.driver=org.testcontainers.jdbc.ContainerDatabaseDriver
Would be nice to be able to get this through the DevServices config.
The text was updated successfully, but these errors were encountered:
I am a little confused, doesn't quarkus.datasource.devservices.properties.TC_INITSCRIPT=db/schema.sql already do what you want?
quarkus.datasource.devservices.properties.TC_INITSCRIPT=db/schema.sql
Sorry, something went wrong.
No it doesn't. When you look at the resolved properties the JDBC url is not a testcontainers url (i.e. jdbc:tc:.......). Its a standard postgres url.
Successfully merging a pull request may close this issue.
Description
The new DevServices stuff in 1.13 is awesome! It would be really nice to be able to pass additional parameters directly to testcontainers.
For example:
where in
src/main/resources/db
there is aschema.sql
file that creates the schema.See the Using a classpath init script section from https://www.testcontainers.org/modules/databases/jdbc/
Right now I'm doing this:
Would be nice to be able to get this through the DevServices config.
The text was updated successfully, but these errors were encountered: