On 07 Feb 2014, at 11:54, Gareth Rushgrove <[email protected]> wrote:
> On 7 February 2014 02:51, gh <[email protected]> wrote: >> On 1/26/14 7:50 AM, Gareth Rushgrove wrote: >>> For anyone else who likes writing tests for their puppet manifests, >>> I've just added basic code coverage to rspec-puppet: >>> >>> A blog post here about how to use it: >>> >>> http://www.morethanseven.net/2014/01/25/code-coverage-for-puppet-modules/ >>> >>> I'd be interested in any feedback on how to improve or add to this. >>> >>> Cheers >>> >>> Gareth >>> >> >> Gareth, >> >> Great blog post. I tried this on a module with 100% coverage and notice >> that it reports back 50% coverage. After some poking around, found that >> it is checking code in spec/fixtures/, the stdlib module actually. There >> seems to be an open issue[1] regarding the inability to exclude things. >> Curious if you found a work around for testing your code and not the >> modules pulled in from .fixtures.yml. >> > > Currently the rspec-puppet coverage stuff does check coverage across > all resources, including those from dependent modules. For example > this module depends on the puppetlabs/apt module - > https://travis-ci.org/garethr/garethr-nginx/jobs/18133670#L113 > > I purposefully didn't add too much configuration to the first pass of > the code, but it would be simple to add some options to ignore > specific modules (I think). I thought I'd wait to see if anyone found > it useful first. > > Gareth Great add-on for rspec-puppet. I really missed that functionality. Adding exclude options would be great. Many thanks, Martin > >> [1] - https://github.com/lemurheavy/coveralls-public/issues/184 >> >> BR, >> -g >> >> -- >> 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 [email protected]. >> To view this discussion on the web visit >> https://groups.google.com/d/msgid/puppet-users/52F44A2E.3070903%40garretthoneycutt.com. >> For more options, visit https://groups.google.com/groups/opt_out. > > > > -- > Gareth Rushgrove > @garethr > > devopsweekly.com > morethanseven.net > garethrushgrove.com > > -- > 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 [email protected]. > To view this discussion on the web visit > https://groups.google.com/d/msgid/puppet-users/CAFi_6y%2B-pZuGexUYciyXDkENL4EQQSJqTBHzaB5NfW9eujt%3D3g%40mail.gmail.com. > For more options, visit https://groups.google.com/groups/opt_out. -- 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 [email protected]. To view this discussion on the web visit https://groups.google.com/d/msgid/puppet-users/5885FE07-2C29-4908-9BFD-354642C330A0%40gmail.com. For more options, visit https://groups.google.com/groups/opt_out.
