官术网_书友最值得收藏!

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)
主站蜘蛛池模板: 柳州市| 泌阳县| 锦屏县| 确山县| 东莞市| 四川省| 理塘县| 大悟县| 北安市| 柳河县| 伊通| 棋牌| 富平县| 铜川市| 南丹县| 青田县| 定西市| 澄城县| 合肥市| 施甸县| 当阳市| 塘沽区| 开封县| 海淀区| 长丰县| 抚顺县| 资中县| 松桃| 泌阳县| 赫章县| 阳泉市| 柘城县| 庄浪县| 阜康市| 麦盖提县| 淮安市| 栾川县| 新邵县| 临高县| 遂平县| 临汾市|