Gavin Williams
2014-Sep-25 13:42 UTC
[Puppet Users] Issue with rspec-puppet testing of roles/profiles module and class evaluation...
Afternoon all I'm currently trying to add some rspec testing to some of our internal modules which are used in a roles/profiles style setup. Each of our products has got it's own module, which all pull in chunks of functionality from a base module. The issue I'm hitting is that when I try and spec test the product module, which attempts to use Glassfish module resources[1], with the base Glassfish class being included as part of a 'base::software::glassfish' class. I've tried adding a 'require base::software::glassfish' as a precondition to rspec, but still get failures... In order to make sure I wasn't doing anything daft, I've created a pair of very simple modules that are available on Github that model the product and base classes I'm trying to test. The modules are: rspec-deptest[2], which is effectively our product module, and rspec-deptest_base[3] which is our base module. The error I'm getting when trying to run *bundle exec rake spec *on the rspec-deptest module is here[4]. I'm also getting this error on travis[5]. Any pointers on what I could be doing wrong, or how I can make it work? Cheers in advance for any responses. Regards Gavin [1] github.com/fatmcgav/fatmcgav-glassfish/tree/develop [2] github.com/fatmcgav/rspec-deptest/tree/use-deptest_profiles [3] github.com/fatmcgav/rspec-deptest_base [4] gist.github.com/fatmcgav/b849b073f04ab592ed45 [5] travis-ci.org/fatmcgav/rspec-deptest/jobs/36255663 -- 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 groups.google.com/d/msgid/puppet-users/662eba67-b574-4364-8444-cdaa3dc26be6@googlegroups.com. For more options, visit groups.google.com/d/optout.