lundi 11 juillet 2016

How to test hiera while doing bats testing

I am using bats for my puppet modules functional testing, so basically i provision host, and rsync all my tests, as well as hiera.yml file and then i have script to get all hiera data, what that script does is it runs

hiera -c <config file> resolv_conf::nameservers region=${region} | sed ..//. 

and store it in some variables now once puppet run finishes on provisioned machine, i compare them using my bats tests.

what i am looking for is some better way to do hiera calls, is there any better way to do hiera calls and get data and later do comparison ?

Regards, DJ

Aucun commentaire:

Enregistrer un commentaire