Hey Alexander, you could also check out serverspec[1] for acceptance tests. It provides simple RSpec tests for your server with a lot of puppet-like matchers, but it's not tied to Puppet (heresy! :). We use it to validate our modules and are very happy with it.
Sven [1] http://serverspec.org/ Am Montag, 14. April 2014 16:05:49 UTC+2 schrieb Alexander Fortin: > > On Sunday, April 13, 2014 11:57:19 AM UTC+2, Johan De Wit wrote: >> >> I still am so surprised when asking who is doing some kind of 'testing', >> almost nobody raises is hand ..... >> >> Most people just don't' see the sense of doing rspec unit tests - why >> writing the same code twice ? >> >> Well, I think there is still a lot of talking to do .... >> >> > Hi Johan, > > sorry for the missed presentation at Puppet User Group Berlin, I'll make > it one day or another and I'll share the slides at least ;) > > I'll be very happy to discuss further the testing topic, because testing > is also very important to us. Actually we do lots of testing on our > manifests (but not with rspec) and catalogs, and precisely I think that > puppet catalog-diff [1] is the key piece in the pipeline for us, because it > shows us for real what's actually changing with every commit we push to our > manifests, plus the noop runs before merging to prod give us the final safe > net to be sure we don't get any unexpected change in production. For the > last 8 months or so it's been working surprisingly well for us and I'm > really willing to share our experience with the community and also getting > and suggestions about how to improve it even further. > > By the way, I'm another one that's not so convinced about the rspec tests > value, to me seems that the unit tests themselves are much less relevant > for a declarative-like language like Puppet. I mean, there's no 'design' > that has to emerge by the unit tests getting green, in our team we already > share a defined design for module structure, and, say, if the coder write > the spec for a file to be there, I don't see why I should trust that more > than a definition of that same thing in the manifest itself, hence the > feeling of code duplication with no real value added. > > What I can see very clearly for normal software development, those values > coming from TDD, I can't see easily for Puppet manifests writing. Something > like Beaker [2] is what we'd like to add to our testing pipeline, i.e. > running tests for the full stack in a VM, but again, stil more then willing > to change my mind about rspec-puppet ;) > > [1] https://github.com/ripienaar/puppet-catalog-diff > [2] https://github.com/puppetlabs/beaker/wiki/Overview > > -- > http://about.me/alexanderfortin > -- You received this message because you are subscribed to the Google Groups "Puppet Users" group. To unsubscribe from this group and stop receiving emails from it, send an email to [email protected]. To view this discussion on the web visit https://groups.google.com/d/msgid/puppet-users/191ad9ff-eb1c-4d56-a298-d416b9a1336d%40googlegroups.com. For more options, visit https://groups.google.com/d/optout.
