Hi,

On 20/10/2015 08:49, Alex Harvey wrote:
Hi all,

I am investigating whether or not I can use Beaker to do acceptance testing on roles and profiles.

I've had a look at Liam Bennett's excellent blog posts -
http://tech.opentable.co.uk/blog/2014/09/01/testing-puppet-with-beaker-pt-dot-3-testing-roles/
http://www.slideshare.net/liamjbennett/cfgmgmt2015-testing-with-beaker

I need to handle a situation in my tests where, say, a role that I am testing will apply a base class which will cause the node, for instance, to join a FreeIPA domain. But I don't want Beaker to actually build a FreeIPA box. And I don't want my short-lived node to join a real FreeIPA domain.

I would hope that Beaker could either build Mock Services
https://en.wikipedia.org/wiki/Mock_object

Or better still, tell Beaker to expect the base class to try to apply the FreeIPA class, and just pretend it succeeds. Just as you can stub out methods in rspec etc.

Has anyone done anything like this before?


On a general note, I'd say that acceptance tests should be end-to-end tests. That would imply, that unless you're actually testing the real domain joining, what value would you get out of the test?


Cheers, David

--
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/56266A0C.4070205%40dasz.at.
For more options, visit https://groups.google.com/d/optout.

Reply via email to