Skip to content
Thang Chung edited this page Jan 12, 2021 · 11 revisions
  1. 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.
  2. 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.
  3. Test lifecycle — normally you would want to recreate the container in between tests to have an isolated and clean environment for each test scenario.
  4. Cleanup — You need to stop and remove the container after your tests run.

Clone this wiki locally