Springboot application facing bellow error or need to implement real test data base:
Senario:
Could not prepare statement [Table “XXXX” not found (this database is empty); SQL statement
Solution:
Add bellow configuration in test application.yml
spring:
test:
database:
replace: none
---
Code:
testImplementation("org.springframework.boot:spring-boot-testcontainers")
testImplementation("org.testcontainers:junit-jupiter")
testImplementation("org.testcontainers:mariadb")
Test containers:
References:
test container examples here
No comments:
Post a Comment
I'm certainly not an expert, but I'll try my hardest to explain what I do know and research what I don't know.