Replies: 3 comments 3 replies
-
You can change the default values provided by OracleContainer using withUsername, withPassword. When using spring boot < 3.1 you can use |
Beta Was this translation helpful? Give feedback.
-
What do you mean by:
? |
Beta Was this translation helpful? Give feedback.
-
ah, I got what you mean. Instead of using jdbc connection, create the container in the test and then provide jdbc url and username/password to spring properties. That's actually quite nice. But the issue is in the For now I neded up with copy-pasting
parts from
part. And now it works. |
Beta Was this translation helpful? Give feedback.
-
HI all,
I was trying to make flyway migration work with testcontainers but they wouldn't.
It appears that JdbcDatabaseContainer overrides explicitly provided user and password.
The default oracle container sets username and password to
test
/test
.In my configuration I explicitly provided
spring.flyway.user=system; spring.flyway.password=test
. But the result connection will use the container's defaulttest
/test
that has no privileges.In my opinion, if user and password is explicitly provided in
info
toJdbcDatabaseContainer.createConnection()
they should be used, not the defaults from the container.I probably should create my own container implementation instead of using default one.
Beta Was this translation helpful? Give feedback.
All reactions