Email verification tests become unreliable when a Docker-based CI job treats a test mailbox as a global service. A retry can read the previous run's message, two branches can claim the same address, and a failed runner can leave data behind.
The pattern that has worked for me is small: make every fixture run-scoped, keep its credentials outside the image, and give cleanup two owners. The test container owns the normal path. A short-lived AWS cleanup task owns the recovery path when the runner disappears.
Why Docker email tests leak across CI runs
A Docker image should contain the test code and its dependencies. It should not contain a mailbox address, API token, or a default inbox that every parallel job uses.…