On Tuesday, April 15, 2014 1:10:05 PM UTC+2, Felix.Frank wrote: > > On 04/15/2014 09:25 AM, Nikola Petrov wrote: > > I haven't used catalog-diff but I > > am suspecting that it might be a substitute for the rspec tests. Tell me > > No. rspec allows you to implement unit tests to catch certain regression > bugs. catalog-diff is rather concerned with integration testing > (although you can use rspec for that as well). >
I think with catalog-diff we're catching regression bugs too, meaning that if the module interface is broken in the proposed commit, it will show up as an error (unless no node is actually including the refactored module). > > does it provide the following: > > > > * Automatic runs through guard/rake/whatever on every commit to verify > > that I am not breaking things like permissions on files > > You could do that, but compiling each of your nodes' catalog on every > commit would be excessive. > > I agree it can be overkill for many environments, I guess depends on what you actually want to test, or better, what kind of confidence you want to have that your committed code is not actually breaking anything. To me seems that the catalog-diff approach is catching a broad variety of problems, also some that (I think) can't be easily catch by expressions in rspec. For example, somewhere in a random manifest I'm just changing declaration style for a class, from 'include myclass' to "class {'myclass': }", leading to possible declaration dependency order / duplicated declarations problems: Node A (which I am currently working on) is including only one declaration, but node B was evaluating that class declaration two times, hence the duplicate declaration only on node B. Can rspec-puppet catch also this kind of problems? More in general, I'd like to know if rspec-puppet can give me the confidence that, given a node resource, the new version of the catalog will compile for that node. -- Alex -- 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 puppet-users+unsubscr...@googlegroups.com. To view this discussion on the web visit https://groups.google.com/d/msgid/puppet-users/826f278e-1b69-4721-9e35-7028627c44fa%40googlegroups.com. For more options, visit https://groups.google.com/d/optout.