Playing Port Authority – TDD for Containers
summary
Argues that applying TDD to container images prevents "pluck and pray" deployments and shows concrete workflow: write a failing ServerSpec test that expects ruby to be installed, implement a tiny Dockerfile using Alpine and apk add ruby, rerun tests to go from failure to "1 example 0 failures". Demonstrates a two-container system wired with docker-compose (Consul + Sinatra), prefill Consul, assert HTTP response "hello from consul", tear down, and integrate tests into CI and Packer-built AMIs so tests run in CD pipelines.
AI-written summary · about
chapters (14)
- 0:00Start
- 3:24Testing production code
- 4:25And testing infrastructure?
- 5:14Step by step
- 8:50Project structure
- 9:45Gemfile
- 10:52Step 2-Simple Web Service
- 11:17Test service in container
- 15:27Compose it!
- 16:37docker-compose.yml
- 18:43The complete test
- 20:07Dockerfile for connected Sinatra app
- 21:42Resource Types
- 22:39Backends
related talks
28mPostmortem: TDD with TestContainers
36mDockerization in the land of Ruby
01h 01mShipping Ruby Apps with Docker
30mUsing Docker & Compose to Simplify Integration Testing
40mDeveloping Ruby Applications with Docker
27mTDD on the Shoulders of Giants
26mTales from the QA Crypt
08mDevOpsCon 2016: Interview with Moritz Heiber
