Blog
Thoughts on engineering, design, and building great products.
CodeBuild Test Reports: A Build Must Not Only Run, It Must Be Correct
A successful build does not mean the code is correct — it only means the commands ran without error. This article has CodeBuild run real tests (pytest) and collect the results into a viewable test report: total count, pass/fail, each case. And why you should let a failing test fail the build, blocking broken code before it reaches deploy.
Testing: terraform test, mock_provider, and Terratest
Test Terraform code before it stands up real infrastructure. terraform test (GA since 1.6) with .tftest.hcl files runs run/assert to check logic, mock_provider (1.7) lets tests run without real AWS. Real demo of three passing tests and one failing test, then an introduction to Terratest for deep integration testing.
Testing Roles with Molecule
Before pushing a role to hundreds of hosts, test it. Molecule spins up a throwaway container, applies the role, checks idempotency, and verifies the result — automatically. This article: scenario structure, the create→converge→idempotence→verify→destroy test loop, and version caveats.