Things can be so easy: Total resources: 56
Touched resources: 56 Resource coverage: 100.00% Thanks a lot! Regards Thomas 2016-02-16 15:28 GMT+01:00 Gareth Rushgrove <gar...@morethanseven.net>: > On 16 February 2016 at 09:37, Thomas Bendler <thomas.bend...@gmail.com> > wrote: > > Hi @all, > > > > I have a small problem with my module test using spec_puppet. I use the > > Puppetlabs MySQL module to create databases in my module. When running > "rake > > spec" my coverage report that not all resources are tested: > > > > <--- snip ---> > > Mysql_database[test1] > > Mysql_grant[test1@localhost/test1.*] > > Mysql_user[test1@localhost] > > <--- snap ---> > > > > How can I include this resources in my spec file to get tested also? I've > > already added the classes to the spec file but this did not solve the > > problem: > > > > <--- snip ---> > > it { is_expected.to contain_class('mysql::server') } > > it { is_expected.to contain_class('mysql::server::backup') } > > it { is_expected.to contain_class('mysql::server::account_security') } > > it { is_expected.to contain_class('mysql::server::mysqltuner') } > > <--- snap ---> > > > > You should be able to do something like the following if memory serves: > > it { is_expected.to contain_mysql_database('test1') } > > Gareth > > > > Is it necessary to create a spec file for each define? Are there any > public > > examples that I can use for education? > > > > Regards Thomas > > -- > > Linux ... enjoy the ride! > > > > -- > > 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+unsubscr...@googlegroups.com. > > To view this discussion on the web visit > > > https://groups.google.com/d/msgid/puppet-users/CAELoU1Pt%3Db1zjGOLrcsp-rEbO%2Bncy_Jv-cu-bqRGXY%3DrsATkHg%40mail.gmail.com > . > > For more options, visit https://groups.google.com/d/optout. > > > > -- > 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 puppet-users+unsubscr...@googlegroups.com. > To view this discussion on the web visit > https://groups.google.com/d/msgid/puppet-users/CAFi_6yLVKzpin%2BQ_VYLi%2BtbswNr1KOzZbL-4Tu6idgQmU_aLRA%40mail.gmail.com > . > For more options, visit https://groups.google.com/d/optout. > -- Linux ... enjoy the ride! -- 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+unsubscr...@googlegroups.com. To view this discussion on the web visit https://groups.google.com/d/msgid/puppet-users/CAELoU1PAZO1fgPWO-viaZ3dMnTccE5wmxG1h_JBKaoRxf0u5AQ%40mail.gmail.com. For more options, visit https://groups.google.com/d/optout.