Skip to content

Testing

Matthias Scholz edited this page Jun 23, 2019 · 8 revisions

Overview

This page should line out testing concepts applied in this project. It is my ( Matthias ) personal opinion based on my current state of knowledge and sensitivities.

State

Current suggestion to start testing this infrastructure project is: terratest.

Evaluation

First step is to pick a powerful, but easy to use and setup testing framework.

Terratest

A go library to write tests for terraform, packer and docker.

Evaluation

Made for terraform.

It is golang.

Test have to be written in golang and hence can make use of the language toolset and libraries.

Has to run on real infrastructure. No pre-evaluation of terraform files.

Conclusion

Organizing a golang project might be a bit more work, but toolset and libraries are powerful. And of course writing golang is fun. ;)

Kitchen-Terraform

There is a toolset to test infrastructure setups done with Chef. This plugin extends the test capabilities for terraform.

Evaluation

Setting it up involves many steps and creates files all over your computer ( like: ruby, bundler, Gemfile ).

Furthermore looking at the first test example reveals the expression of the whole infrastructure just in a different language.

It uses Inspec. There is a competitor called serverspec. It is not clear which one is the future.

It is based on ruby.

Kitchen.CI was made to evaluate Chef infrastructure definition.

Conclusion

From my perspective the setup is too complicated hence the maintenance will be complicated too. A tool made for Chef made fit for terraform - this does not sound like a straight forward solution. For now ( 2019-06-20 ) Kitchen-Terraform does not seem the right fit for this project.

Clone this wiki locally