Re: [Puppet Users] Spec testing and dalen-puppetdbquery

2017-03-30 Thread Erik Dalén
A bit late to the party here, but in my (rspec-puppet) tests I have created a mock version of the function in a before(:each) block in the unit test for the class, like this: before(:each) do Puppet::Parser::Functions.newfunction(:query_nodes, :type => :rvalue) { |_| ["foo.example.com",

Re: [Puppet Users] Spec testing and dalen-puppetdbquery

2016-12-19 Thread Jordan Conway
I was running into the same issue with that module, and I found that including the puppetdb mock class from the source module helped. It may be more involved, but at first glance, this helps me quiet a bunch of the errors to get down to spec testing my actual module.

Re: [Puppet Users] Spec testing and dalen-puppetdbquery

2016-11-01 Thread Peter Berghold
Garret: I do have dalen-puppetdb in my .fixtures.yaml file. A link to my project? unfortunately I'm developing all this work inside my client's cloud and can't provide a link. On Tue, Nov 1, 2016 at 6:11 PM Peter Berghold wrote: > That's what I was beginning to

Re: [Puppet Users] Spec testing and dalen-puppetdbquery

2016-11-01 Thread Peter Berghold
That's what I was beginning to suspect Andy. Now I have to go find the Ubuntu version of that On Tue, Nov 1, 2016 at 5:38 PM Andrew Grimberg wrote: > On 11/01/2016 02:25 PM, Garrett Honeycutt wrote: > > On 11/1/16 4:03 PM, Peter Berghold wrote: > >> I have a module

Re: [Puppet Users] Spec testing and dalen-puppetdbquery

2016-11-01 Thread Andrew Grimberg
On 11/01/2016 02:25 PM, Garrett Honeycutt wrote: > On 11/1/16 4:03 PM, Peter Berghold wrote: >> I have a module that I am writing spec tests for that uses the Puppet >> Forge module cited in the subject line to query for a list of nodes >> fitting a particular criteria. When I run the spec test

Re: [Puppet Users] Spec testing and dalen-puppetdbquery

2016-11-01 Thread Garrett Honeycutt
On 11/1/16 4:03 PM, Peter Berghold wrote: > I have a module that I am writing spec tests for that uses the Puppet > Forge module cited in the subject line to query for a list of nodes > fitting a particular criteria. When I run the spec test it bombs out > with a message: "cannot load such file