HPUX_PUPPET
2014-Feb-19 00:56 UTC
[Puppet Users] Good resources for writing rspec tests for puppet code changes?
I am trying to get puppet to support HPUX better than it does now so it can manage user accounts properly. I have already contributed changes to the HPUX module to change passwords, but writing the rspec at the time was more hack and guess than any real methodology. I did read the Learning Rspec guide. It helped a small bit. My problem is that I tried to write updates to handle password expiration and found what should have worked did not. Not coding daily the rspec drains out of my head faster that I can get it back in. I see lots of examples out on the net, but even trying to hack around on that code to try to get it work is still not doing providing valid test cases. Can someone point me to something that will make logical sense to me as well as how to actually get useful debug info when testing puppet rspec files against my changes? I have tried dozens of ways from the net, but I am just not getting any trace type output to let me know what it found when it did a test, what was passed to the code block or even much to help me track down why it is not working. I can get the Ruby code to do what I want, but cannot submit it without associated rspec tests. I would prefer to learn to do it correctly for when I want to tweak more HPUX specific work and then possibly some AIX as well. I really want to get puppet in place to handle all of the non-Linux boxes, but right now it is not doing it in all cases. It is not that rspec is that complex, it is the integration into puppet and having to dig back through tons of code to try to find where everything is getting fed into the hpux user modules to be able to test. If I coded regularly I am sure this would be a lot easier :) I am still trying to self-teach Ruby and now add in Rspec. Thanks! -- 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+unsubscribe@googlegroups.com. To view this discussion on the web visit https://groups.google.com/d/msgid/puppet-users/6f4c9fbf-13d1-42a5-9672-5b9e38c7c59e%40googlegroups.com. For more options, visit https://groups.google.com/groups/opt_out.