-
Notifications
You must be signed in to change notification settings - Fork 282
Home
Thang Chung edited this page Jan 15, 2021
·
11 revisions
- Orchestration — how do you know when Redis will be ready to receive traffic after you start it? You’d need some kind of health check and waiting strategy.
- Parallelism — Since port 6379 will be allocated, you cannot run multiple tests in parallel. You could choose not to expose that specific port and the - Docker daemon would automatically bind it to a random free port on your machine, but then you wouldn’t know what port to connect to from your tests to interact with Redis.
- Test lifecycle — normally you would want to recreate the container in between tests to have an isolated and clean environment for each test scenario.
- Cleanup — You need to stop and remove the container after your tests run.
Ref at https://medium.com/@jdelucaa/integration-testing-with-docker-and-testcontainers-3e53e6f44a1b
- Unit tests
- Integration tests
- With https://www.testcontainers.org/ and .NET https://github.com/HofmeisterAn/dotnet-testcontainers
- With
kindhttps://www.praqma.com/stories/testing-kubernetes-deployments-within-ci-pipelines/ - With
k3dhttps://www.arrikto.com/uncategorized/k3d-github-actions-kubernetes-e2e-testing-made-easy/