FAQ
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.

--
You received this message because you are subscribed to the Google Groups "Puppet Users" group.
To view this discussion on the web visit https://groups.google.com/d/msg/puppet-users/-/Myj1KaztMkwJ.
To post to this group, send email to puppet-users@googlegroups.com.
To unsubscribe from this group, send email to puppet-users+unsubscribe@googlegroups.com.
For more options, visit this group at http://groups.google.com/group/puppet-users?hl=en.

Search Discussions

  • Matthias Viehweger at Jan 2, 2013 at 12:53 pm
    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

Related Discussions

Discussion Navigation
viewthread | post
Discussion Overview
grouppuppet-users @
categoriespuppet
postedDec 26, '12 at 12:02a
activeJan 2, '13 at 12:53p
posts2
users2
websitepuppetlabs.com

People

Translate

site design / logo © 2022 Grokbase