- Chef:Powerful Infrastructure Automation
- John Ewart Matthias Marschall Earl Waud
- 169字
- 2021-07-09 21:06:33
Chapter 5. Testing Your Recipes
So far, you have seen how to model your infrastructure, provision hosts in the cloud, and what goes into a cookbook. One important aspect of developing cookbooks is writing tests so that your recipes do not degrade over time or have bugs introduced into them in the future. This chapter introduces you to the following concepts:
- Understanding test methodologies
- How RSpec structures your tests
- Using ChefSpec to test recipes
- Running your tests
- Writing tests that cover multiple platforms
These techniques will prove to be very useful to write robust, maintainable cookbooks that you can use to confidently manage your infrastructure. Tests enable you to perform the following:
- Identify mistakes in your recipe logic
- Test your recipes against multiple platforms locally
- Develop recipes faster with local test execution before running them on a host
- Catch the changes in dependencies that will otherwise break your infrastructure before they get deployed
- Write tests for bugs to prevent them from happening again in the future (regression)
推薦閱讀
- 大學計算機信息技術導論
- 商戰數據挖掘:你需要了解的數據科學與分析思維
- JBoss ESB Beginner’s Guide
- 21天學通Visual C++
- Ceph:Designing and Implementing Scalable Storage Systems
- Machine Learning with Apache Spark Quick Start Guide
- 邊緣智能:關鍵技術與落地實踐
- 網絡管理工具實用詳解
- ZigBee無線通信技術應用開發
- 計算智能算法及其生產調度應用
- 步步驚“芯”
- Serverless Design Patterns and Best Practices
- ARM嵌入式開發實例
- 深度學習之模型優化:核心算法與案例實踐
- 工業機器人與自控系統的集成應用