Open wjam opened 6 years ago
Would be a nice addition. One question, I suppose, is if we could just make it easy to integrate serverspec directly?
serverspec wouldn't be easy to integrate with due to the fact that it's written purely in Ruby. goss would be another alternative, as it is written in Ruby, but it's been written with the assumption that it'd be built as an executable and then run on the remote machine.
Well, Terratest already executes various binaries/scripts written in other languages: e.g., it runs terraform apply
, packer build
, and so on, using whatever happens to be installed on your OS. So I could see using Terratest to spin up various resources and then calling out to serverspec
to validate those resources meet certain requirements.
I've been using Terratest in anger recently and have had an idea about potential further functionality for the library.
As part of building an AMI, it's common to spin up the AMI once created in a test instance to test that the AMI contains all of the relevant changes, such as confirming that it contains the enhanced networking driver or that a piece of software that was installed can be started by systemd. Other solutions in this area would be something like serverspec.
My idea is about adding similar functionality to serverspec to Terratest to make it easier to verify the state of an instance, such as simplifying the querying of the group, encrypted password, etc of a user or querying the state of a service in systemd.