Reputation: 1304
I need to setup integration tests in a Spring Boot project using Postgres, Redis and Elasticsearch (at some point later also Kafka will be added). So far I've found two options:
Third option requires a bit of manual work. It's definitely possible to make a docker compose file with all the services needed for testing for local usage and let infrastructure team build containers the way they want for running tests in a pipeline. But this way a developer would have to manually start/stop those containers when running tests locally.
Is there a way to automate this process? Or any options similar to Testcontainers that would work in Kubernetes? Or perhaps there is a way to run Testcontainers in Kubernetes?
Thank you in advance.
Upvotes: 4
Views: 3643
Reputation: 12029
You can run testcontainers in Kubernetes based builds. You just need a container runtime available in your build (container). This could be rootless docker and is independent of the container runtime used by your kubernetes cluster.
Upvotes: 4