Chef Cookbook Testing Like a Pro
summary
Automated cookbook testing pipeline uses Cookstyle (auto-fixes ~95%) and Foodcritic (≈87 rules) for linting, ChefSpec for unit tests, and Test Kitchen + InSpec for real integration runs; Delivery Local and Kitchen‑Dokken let CI (Travis) run full multi‑platform converges so a PR gets lint, unit, and integration checks in about five minutes. Kitchen‑Dokken and bento images require container hacks to mimic VMs but the workflow proves effective at catching repository, package and runtime failures before deploy.
AI-written summary · about
chapters (7)
- 0:00The need for testing
- 6:36Linting your code
- 13:11Unit testing with ChefSpec
- 17:56Integration with Test Kitchen
- 20:46Verification with InSpec
- 24:20Automating the workflow
- 33:01Q&A and best practices
related talks
01h 21mTest Driving your Rails Infrastructure with Chef
36mIntroduction to Test-kitchen and InSpec
27mTDDing tmux
42mCI Techniques for Delivering the Chef-Repo: Three Case Studies
18mCookbook Quality Metrics and You!
06mTen Quick Tips to Improve Your Chef Workflow
28mChef Cookbook Design Patterns
40mJenkins and Chef: Infrastructure CI and Application Deployment
