Menu

AWS CI: Run-Scoped Email Fixtures in Docker
📰

AWS CI: Run-Scoped Email Fixtures in Docker

DEV Community: cicd·jasonmills94·1 day ago
#oyKF3XpJ
#devtocicd#devto#dev#fixture#test
Long article (1021 words) — no AI summary yet.
Reading 0:00
15s threshold

Email verification tests are deceptively easy to make green. A Docker job starts, creates a user, waits for a message, and checks that a link arrived. The problem begins when the inbox is shared: an old message can satisfy the new test, or two parallel jobs can read each others evidence.

I treat email fixtures as run-scoped infrastructure. Every CI run gets an identity, a bounded lifetime, and a cleanup owner. The email service can be a fake email generator or a small internal test adapter, but the control plane belongs in the pipeline. This makes failures more boring to investigate, which is exactly what I want from CI.

Why shared email fixtures break CI

A shared test inbox creates several failure modes:

A previous verification message is still present.

Parallel Docker jobs receive similar messages and race to consume them.

A retry reads the first attempt's message and reports a false success.

Cleanup is manual, so abandoned addresses and messages accumulate.

The visible failure may be in the…

Continue reading — create a free account

Join HashtagPLUS to read full articles, follow hashtags, vote, and join the conversation.