Test container not picking up migration file.
SarpongAbasimi opened this issue Β· comments
Hey π,
I am working on a Scala project and would like to use Testcontainers to test database migration.
The problem I am currently facing is that the migration file is not being picked up by Testcontainers.
Class.forName(container.driverClassName)
val connection = DriverManager.getConnection(
container.jdbcUrl,
container.username,
container.password
)
Do I need any special config for this to happen?
Could you give more details? How do you create your containers? Where are your migrations? How do you expect them to work?
@LMnet I create my containers using
Class.forName(container.driverClassName)
val connection = DriverManager.getConnection(
container.jdbcUrl,
container.username,
container.password
)
Ref - Link - https://github.com/testcontainers/testcontainers-scala
Maybe I am not clear on how Testcontainers works, I will investigate further.
@SarpongAbasimi this code does not seem related to the testcontainers and to your question. At this moment I could only suggest you read the documentation of testcontains-scala and testcontainers-java.
I have also gotten testcontainers to work this morning so it is all good thanks.