On 17/03/11 16:07, Mark Phillips wrote: > On 17 Mar 2011, at 05:42, James Turnbull wrote: > >> Dominic Cleal wrote: >>> Nobody has been looking at it, it would be great if you and Mark want to >>> and I'd be happy to help. I haven't even seen any examples of pkgutil >>> catalogs with multiple versions, so it'd be good to check it copes >>> properly in its current form too. (Unit tests!) >>> >>> I think it's best to first collect some evidence about the output format >>> of pkgutil with multiple versions and what's possible compared to say >>> yum, then work out how to integrate that into the provider. >>> >> >> And tests. Tests are always awesome. :) > > And on that subject James, do Puppetlabs have any recommendations for > testing - types of evidence, frameworks, etc. My only experience is Perl > Test::More and the likes, if you've any tips on what we could produce for > Puppet/Ruby that'd be great.
Just to add to Daniel and James, I recently wrote a test for the pkgutil provider based on the current implementation. You'll find it in the latest branch (Juerg's) at spec/unit/provider/package/pkgutil_spec.rb. Hopefully it's fairly easy to follow and extend. Also see: http://projects.puppetlabs.com/projects/puppet/wiki/Development_Writing_Tests Actually, it looks Juerg's recent commits have caused it to break, so I'll go through later and update it to cover the changes. Will update #4258 when it's done. $ ruby spec/unit/provider/package/pkgutil_spec.rb .....F.FFF.F..F. Failures: 1) Puppet::Type::Package::ProviderPkgutil when updating should use a command without versioned package [... etc ...] -- Dominic Cleal Red Hat Consulting m: +44 (0)7818 512168 -- 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+unsubscr...@googlegroups.com. For more options, visit this group at http://groups.google.com/group/puppet-users?hl=en.