[Puppet] Module testing blocker

Hunter Haugen hunter at puppetlabs.com
Wed Feb 17 18:47:15 UTC 2016

On Wed, Feb 17, 2016 at 7:09 AM, Jeffrey Borcean <jeffrey at osuosl.org> wrote:

> Hello team,
> We seem to have hit a blocker in running the acceptance tests against
> motd; resulting in a crash sating "`rescue in find_only_one': There
> should be one host with database defined".  See the full output here [1].

This happens when there is not a type specified in the nodeset, or if the
type is "pe" as this assumes you have a full PE stack which needs master,
dashboard, and database roles.

is a foss type, so won't hit this issue.

> As part of the debugging process I used pry to step through what beaker
> was running and further examine the failure. This did not yield much useful
> information aside from seeing that it would fail after entering
> lib/beaker/dsl/host_helpers.rb:62.
> I reached out to Ian who suggested I use git bisect to find a commit
> between when we had gotten tests working and after QA had done work on the
> modules. With that I found commit 0e3c8359de85efc8a17c39406fbc49f815c9841f
> to be the most recent commit against which tests would execute cleanly.
> Questions for you:
> Are we calling the beaker tests correctly?
> bundle exec rake beaker

That does work on pretty much any module as that rake task is provided by
puppetlabs_spec_helper (

> And to test against something other than default.yml
> env BEAKER_set=ubuntu-server-1404-x64 bundle exec rake beaker

Yep. The BEAKER_set variable checks for a file of
spec/acceptance/nodesets/${BEAKER_set}.yml and the rake task should pick it

As Bryan mentioned, you can use BEAKER_setfile to point to a file located
elsewhere on the filesystem, which we often do as many of the beaker
nodesets in the repos are not consistent.

> Would it be beneficial to have a QA engineer that we can ask questions
> regarding the differences between how we test and how the QA team tests
> modules?
> [1]
> https://gist.github.com/borcean/1f07ea642a48ea4ac1a5#file-beaker_error-L48

That's beaker 2.29.0... I think 2.34.0 is the latest. Just a small note.

I'll see if we can get a QA person to be on the mailing list, but I kind of
doubt it as our main QA engineer is on leave and our backup is about to go
on leave. I'll check with AJ

We (the module engineers) usually test as you are; using vagrant boxes from
https://atlas.hashicorp.com/puppetlabs and running bundle exec rake beaker
or rspec spec/acceptance with some general set of nodesets via

> Thank you,
> --
> Jeffrey Borcean
> Student Systems Engineer
> OSU Open Source Lab
> _______________________________________________
> Puppet mailing list
> Puppet at lists.osuosl.org
> http://lists.osuosl.org/mailman/listinfo/puppet
-------------- next part --------------
An HTML attachment was scrubbed...
URL: <http://lists.osuosl.org/pipermail/puppet/attachments/20160217/ffe672f0/attachment-0001.html>

More information about the Puppet mailing list