Reading through the recently published style guide, I see http://docs.puppetlabs.com/guides/style_guide.html#tests saying: "All manifests should have a corresponding test manifest in the module’s tests directory." Is there any documentation on how these work? I couldn''t find anything in the documentation on puppetlabs or any mention in release notes. -- You received this message because you are subscribed to the Google Groups "Puppet Users" group. To post to this group, send email to puppet-users@googlegroups.com. To unsubscribe from this group, send email to puppet-users+unsubscribe@googlegroups.com. For more options, visit this group at http://groups.google.com/group/puppet-users?hl=en.
On Thu, Mar 31, 2011 at 8:20 AM, Clay Caviness <ccaviness@gmail.com> wrote:> Reading through the recently published style guide, I see > http://docs.puppetlabs.com/guides/style_guide.html#tests saying: > > "All manifests should have a corresponding test manifest in the module’s > tests directory." >the idea is to have maintain basic tests written in Puppet for all of your manifests in a module. they can serve not only as basic smoke tests, but also as a reference for example code of how a class/define should be used. the simplest tests would be: class{ ''foo'': } more complicated tests would involve specifying required dependencies and parameters.> Is there any documentation on how these work? I couldn''t find anything in > the documentation on puppetlabs or any mention in release notes. > > -- > You received this message because you are subscribed to the Google Groups > "Puppet Users" group. > To post to this group, send email to puppet-users@googlegroups.com. > To unsubscribe from this group, send email to > puppet-users+unsubscribe@googlegroups.com. > For more options, visit this group at > http://groups.google.com/group/puppet-users?hl=en. >-- You received this message because you are subscribed to the Google Groups "Puppet Users" group. To post to this group, send email to puppet-users@googlegroups.com. To unsubscribe from this group, send email to puppet-users+unsubscribe@googlegroups.com. For more options, visit this group at http://groups.google.com/group/puppet-users?hl=en.
On Thu, Mar 31, 2011 at 11:29, Dan Bode <dan@puppetlabs.com> wrote:> > > On Thu, Mar 31, 2011 at 8:20 AM, Clay Caviness <ccaviness@gmail.com>wrote: > >> Reading through the recently published style guide, I see >> http://docs.puppetlabs.com/guides/style_guide.html#tests saying: >> >> "All manifests should have a corresponding test manifest in the module’s >> tests directory." >> > > the idea is to have maintain basic tests written in Puppet for all of your > manifests in a module. > >they can serve not only as basic smoke tests, but also as a reference for> example code of how a class/define should be used. > >But when/how are these tests run?> the simplest tests would be: > > class{ ''foo'': } > > more complicated tests would involve specifying required dependencies and > parameters. > >Are there examples and documentation on how they should work available anywhere?> >> Is there any documentation on how these work? I couldn''t find anything in >> the documentation on puppetlabs or any mention in release notes. >> >> -- >> You received this message because you are subscribed to the Google Groups >> "Puppet Users" group. >> To post to this group, send email to puppet-users@googlegroups.com. >> To unsubscribe from this group, send email to >> puppet-users+unsubscribe@googlegroups.com. >> For more options, visit this group at >> http://groups.google.com/group/puppet-users?hl=en. >> > >-- You received this message because you are subscribed to the Google Groups "Puppet Users" group. To post to this group, send email to puppet-users@googlegroups.com. To unsubscribe from this group, send email to puppet-users+unsubscribe@googlegroups.com. For more options, visit this group at http://groups.google.com/group/puppet-users?hl=en.
On Thu, Mar 31, 2011 at 8:37 AM, Clay Caviness <ccaviness@gmail.com> wrote:> On Thu, Mar 31, 2011 at 11:29, Dan Bode <dan@puppetlabs.com> wrote: > >> >> >> On Thu, Mar 31, 2011 at 8:20 AM, Clay Caviness <ccaviness@gmail.com>wrote: >> >>> Reading through the recently published style guide, I see >>> http://docs.puppetlabs.com/guides/style_guide.html#tests saying: >>> >>> "All manifests should have a corresponding test manifest in the module’s >>> tests directory." >>> >> >> the idea is to have maintain basic tests written in Puppet for all of your >> manifests in a module. >> >> > they can serve not only as basic smoke tests, but also as a reference for >> example code of how a class/define should be used. >> >> > But when/how are these tests run? >the tests should be run during development, I usually run them with --noop I have been working on some other utilities as well for integrating these smoke tests into a build pipeline https://github.com/puppetlabs/interface-utils> > >> the simplest tests would be: >> >> class{ ''foo'': } >> >> more complicated tests would involve specifying required dependencies and >> parameters. >> >> > Are there examples and documentation on how they should work available > anywhere? >probably not, I am more than happy to discuss either here or <bodepd> on freenode :(> >> >>> Is there any documentation on how these work? I couldn''t find anything in >>> the documentation on puppetlabs or any mention in release notes. >>> >>> -- >>> You received this message because you are subscribed to the Google Groups >>> "Puppet Users" group. >>> To post to this group, send email to puppet-users@googlegroups.com. >>> To unsubscribe from this group, send email to >>> puppet-users+unsubscribe@googlegroups.com. >>> For more options, visit this group at >>> http://groups.google.com/group/puppet-users?hl=en. >>> >> >> >-- You received this message because you are subscribed to the Google Groups "Puppet Users" group. To post to this group, send email to puppet-users@googlegroups.com. To unsubscribe from this group, send email to puppet-users+unsubscribe@googlegroups.com. For more options, visit this group at http://groups.google.com/group/puppet-users?hl=en.
On Thu, Mar 31, 2011 at 12:04, Dan Bode <dan@puppetlabs.com> wrote:> >> Are there examples and documentation on how they should work available >> anywhere? >> > > probably not, I am more than happy to discuss either here or <bodepd> on > freenode :( > >Well, I''m very interested in testing in general, but it''s probably a bit premature to put it in the style guide if it''s not clearly documented what they are and how they work. No? -- You received this message because you are subscribed to the Google Groups "Puppet Users" group. To post to this group, send email to puppet-users@googlegroups.com. To unsubscribe from this group, send email to puppet-users+unsubscribe@googlegroups.com. For more options, visit this group at http://groups.google.com/group/puppet-users?hl=en.
On Mar 31, 3:22 pm, Clay Caviness <ccavin...@gmail.com> wrote:> Well, I''m very interested in testing in general, but it''s probably a bit > premature to put it in the style guide if it''s not clearly documented what > they are and how they work. No?Nah, I disagree with that. As far as I''m concerned, our policy is to write a given document as a good document! If that ends up revealing deficiencies elsewhere, we fix those when we can. (In this case, being "good" meant capturing the best practices for module development as understood by our professional services team and others. Leaving out the note about testing would have made it a document about something other than the current best practices.) Anyway, I''m writing a short document about module testing now. If you see other things missing in the documentation, we love getting tickets filed. -- You received this message because you are subscribed to the Google Groups "Puppet Users" group. To post to this group, send email to puppet-users@googlegroups.com. To unsubscribe from this group, send email to puppet-users+unsubscribe@googlegroups.com. For more options, visit this group at http://groups.google.com/group/puppet-users?hl=en.
On Thu, Mar 31, 2011 at 19:01, Nick Fagerlund <nick.fagerlund@puppetlabs.com> wrote:> Anyway, I''m writing a short document about module testing now.Perfect.> If you see other things missing in the documentation, we love getting > tickets filed. >Will do! -- You received this message because you are subscribed to the Google Groups "Puppet Users" group. To post to this group, send email to puppet-users@googlegroups.com. To unsubscribe from this group, send email to puppet-users+unsubscribe@googlegroups.com. For more options, visit this group at http://groups.google.com/group/puppet-users?hl=en.