Gavin Williams
2014-Jan-16 17:27 UTC
[Puppet Users] Rspec-puppet and testing for expected failures...
Afternoon all, I'm trying to add some rspec-puppet testing to my Glassfish module[1], in preparation for releasing it to the forge. I've got some stuff working fine, however I'm trying to test expected failure scenarios without much luck. Travis CI[2] highlights the issues I'm seeing. An example error message is:> Failure/Error: expect { > > expected Puppet::Error with message matching /OSFamily Suse not supported/ > but nothing was raised >This is as a result of a test[3] which is testing some validation logic in my create_service[4] defined type. Any pointers on where I could be going wrong? Thanks in advance for any responses. Regards Gavin [1] https://github.com/fatmcgav/puppet-glassfish [2] https://travis-ci.org/fatmcgav/puppet-glassfish/jobs/17072897# [3] https://github.com/fatmcgav/puppet-glassfish/blob/master/spec/defines/create_service_spec.rb#L127-149 [4] https://github.com/fatmcgav/puppet-glassfish/blob/master/manifests/create_service.pp#L14-19 -- 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/f04c1f56-60c0-4fa9-be03-f5fbe1129ce5%40googlegroups.com. For more options, visit https://groups.google.com/groups/opt_out.