Image for post
Image for post

Testing Change Config

A bug that gets into the web application can be fixed and tested, and rolled out to production. But what if there’s a flaw in the infrastructure?

The Tools: Unit Tests

The unit tests are a first line of defense in increasing coding maturity and early warning for defects. It is valuable for testing expected result from change configuration platform’s interface, which sometimes yield surprising results and have bugs themselves. Both Puppet and Chef have this for testing the convergence of resources:

The Tools: Integration Tests

Testing the usage resources is important, but what about putting it all together, testing if the underlying package did what it was suppose to do, or testing in conjunction with deploy code; or what about testing migrating change configuration platforms, or testing configuration that occurs at build and deploy time instead of during runtime, such as the case with Docker and Kubernetes.

Enter Test Kitchen

Test Kitchen is a robust test-harness and orchestration solution that works across many platforms. The solution brings several components together in a consistent way:

Concluding Thoughts

As infrastructure that is being used by customers is difficult to change or test, unit tests and integration tests are vital to verify functionality. There may be an initial upfront cost to development tests, called prevention costs, but downstream the costs savings are significant given the nature of infrastructure tech debt.

Written by

Linux NinjaPants Automation Engineering Mutant — exploring DevOps, Kubernetes, CNI, IAC

Get the Medium app

A button that says 'Download on the App Store', and if clicked it will lead you to the iOS App store
A button that says 'Get it on, Google Play', and if clicked it will lead you to the Google Play store