Integration tests with PostgreSQL in a single step
Hello,
I have project based on maven, testng and spring. Project has only integration tests that needs database to pass. And I want to have one build step that runs all integration tests.\
I see two options here:
1. use Docker Compose runner type as build step before integration tests, and then run tests against container that will be alive until pipeline finish. (if this is possible at all)
2. use Docker in Docker. This option seems to be more complex, but it is guarantee that containers will be dropped after build step complete.
Is there any alternative way to do it? (except hosting postgres open to the world, for external connection)
If not, what option would you select and why?
Thanks.
Please sign in to leave a comment.