Hey everyone!
I'm relatively new to JOOQ and eager to find some guidance. I'm working with a stack that includes Kotlin, Spring Boot, Flyway, Testcontainers, and JOOQ.
Here's what I'm aiming to achieve:
I couldn't find a straightforward solution for this, but I did find something similar using docker-compose (before moving to tests).
Here's an example implementation: https://github.com/Ulllie/battle/tree/feature/test-jooq-with-testcontainer/jooq
BUT, the main issue arises when tests start running. JOOQ codegen tries to connect to the database again and fails because it wants to connect to port 5432, but in my tests, I intend to use TestContainers.
This setup might be overkill, and I'm confident there could be a simpler solution.
The whole idea is to be able to run a single command - gradle build, without any pre-existing databases, to handle migrations, generate JOOQ classes, and then run integration tests. Plus, I can't figure out how to separate these concepts, i.e., I want to keep the ability to run tests by themselves.
I realize my question is a bit sprawling, so thanks in advance for bearing with me and any help you can offer