Hi Vincent! On Tue, Dec 25, 2012 at 03:26:55PM -0800, Vincent Janelle wrote: > Is there a way of determining spec testing reports of manifests? I'm > adding tests to an existing deployment and it'd be useful to find out what > code isn't being tested.
I am not aware of such a tool. Also, I do not think that this is easily possible. Testing (both with rspec and cucumber) puppet means checking the compiled catalog. A mapping back to the declarative manifests which are also split into multiple files trhough modules and assembled back together by types and classes is difficult. Personally, I set up a guard (file-system watcher) that executes the tests when I change something. For testing existing declarations, I have the following process: 1. write the test that resembles the current state 2. if the new test is green, I check by commenting out the puppet code. 3. repeat step 1 and 2 until the test fails without the puppet code 4. commit the new test into version control, have the production active again and run all tests to see if the test also works in the complete run. 5. after commiting to version control, I use the opportunity to clean up the code a little, maybe document better or something like that, but that's the developer in me. :) Cheers, Matthias Viehweger -- Serververwaltung und Softwareentwicklung https://www.heute-kaufen.de Prinzessinnenstraße 20 - 10969 Berlin
signature.asc
Description: Digital signature