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", "bar.example.com"] }
  end



On Mon, 19 Dec 2016 at 18:23 Jordan Conway  wrote:

> 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.
>
>
> https://raw.githubusercontent.com/dalen/puppet-puppetdbquery/master/spec/puppet/util/puppetdb.rb
>
> Cheers,
> Jordan
>
>
> On Tuesday, November 1, 2016 at 6:13:03 PM UTC-4, Salty Old Cowdawg wrote:
>
> 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 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 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 -- puppet/util/puppetdb"
> >>
> >> After a bit of searching I am still left wondering package or gem this
> >> is looking for.  Anybody know?
> >>
> >
> > Hi,
> >
> > Do you have dalen/puppet-puppetdbquery in your .fixtures.yml? A link to
> > your project would make debugging easier.
>
> It's probably related to the fact that dalen-puppetdbquery requires
> PuppetDB Terminus installed. Not certain how you get around that for
> spec tests.
>
> -Andy-
>
> --
> 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...@googlegroups.com.
>
>
> To view this discussion on the web visit
> https://groups.google.com/d/msgid/puppet-users/ea142093-9c29-2fe2-8202-0ae09709ef21%40bardicgrove.org
> .
> For more options, visit https://groups.google.com/d/optout.
>
> --
> 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/58d955c3-1c4d-4e37-b29b-d952f0e64775%40googlegroups.com
> 
> .
> For more options, visit https://groups.google.com/d/optout.
>

-- 
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/CAAAzDLfhHUWsU5ScFFB_9KCzNBo49L2XyaRsvrC_Uw67gAKFmw%40mail.gmail.com.
For more options, visit https://groups.google.com/d/optout.


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.

https://raw.githubusercontent.com/dalen/puppet-puppetdbquery/master/spec/puppet/util/puppetdb.rb

Cheers,
Jordan


On Tuesday, November 1, 2016 at 6:13:03 PM UTC-4, Salty Old Cowdawg wrote:
>
> 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 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 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 -- puppet/util/puppetdb"
>>> >>
>>> >> After a bit of searching I am still left wondering package or gem this
>>> >> is looking for.  Anybody know?
>>> >>
>>> >
>>> > Hi,
>>> >
>>> > Do you have dalen/puppet-puppetdbquery in your .fixtures.yml? A link to
>>> > your project would make debugging easier.
>>>
>>> It's probably related to the fact that dalen-puppetdbquery requires
>>> PuppetDB Terminus installed. Not certain how you get around that for
>>> spec tests.
>>>
>>> -Andy-
>>>
>>> --
>>> 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...@googlegroups.com .
>>> To view this discussion on the web visit 
>>> https://groups.google.com/d/msgid/puppet-users/ea142093-9c29-2fe2-8202-0ae09709ef21%40bardicgrove.org
>>> .
>>> For more options, visit https://groups.google.com/d/optout.
>>>
>>

-- 
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/58d955c3-1c4d-4e37-b29b-d952f0e64775%40googlegroups.com.
For more options, visit https://groups.google.com/d/optout.


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 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 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 -- puppet/util/puppetdb"
> >>
> >> After a bit of searching I am still left wondering package or gem this
> >> is looking for.  Anybody know?
> >>
> >
> > Hi,
> >
> > Do you have dalen/puppet-puppetdbquery in your .fixtures.yml? A link to
> > your project would make debugging easier.
>
> It's probably related to the fact that dalen-puppetdbquery requires
> PuppetDB Terminus installed. Not certain how you get around that for
> spec tests.
>
> -Andy-
>
> --
> 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/ea142093-9c29-2fe2-8202-0ae09709ef21%40bardicgrove.org
> .
> For more options, visit https://groups.google.com/d/optout.
>
>

-- 
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/CAArvnv2FC_ZYS2ttFo_6L98EBkdNoCTXB1mP0%2BZNbRReATRRrw%40mail.gmail.com.
For more options, visit https://groups.google.com/d/optout.


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 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 -- puppet/util/puppetdb"
> >>
> >> After a bit of searching I am still left wondering package or gem this
> >> is looking for.  Anybody know?
> >>
> >
> > Hi,
> >
> > Do you have dalen/puppet-puppetdbquery in your .fixtures.yml? A link to
> > your project would make debugging easier.
>
> It's probably related to the fact that dalen-puppetdbquery requires
> PuppetDB Terminus installed. Not certain how you get around that for
> spec tests.
>
> -Andy-
>
> --
> 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/ea142093-9c29-2fe2-8202-0ae09709ef21%40bardicgrove.org
> .
> For more options, visit https://groups.google.com/d/optout.
>

-- 
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/CAArvnv3HqPDnmE5y6RhUMEMt40ZWV7HB6ZgGqUHWMSb%3DegN0Ew%40mail.gmail.com.
For more options, visit https://groups.google.com/d/optout.


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 it bombs out
>> with a message: "cannot load such file -- puppet/util/puppetdb"
>>
>> After a bit of searching I am still left wondering package or gem this
>> is looking for.  Anybody know? 
>>
> 
> Hi,
> 
> Do you have dalen/puppet-puppetdbquery in your .fixtures.yml? A link to
> your project would make debugging easier.

It's probably related to the fact that dalen-puppetdbquery requires
PuppetDB Terminus installed. Not certain how you get around that for
spec tests.

-Andy-

-- 
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/ea142093-9c29-2fe2-8202-0ae09709ef21%40bardicgrove.org.
For more options, visit https://groups.google.com/d/optout.


signature.asc
Description: OpenPGP digital signature


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 -- puppet/util/puppetdb"
> 
> After a bit of searching I am still left wondering package or gem this
> is looking for.  Anybody know? 
> 

Hi,

Do you have dalen/puppet-puppetdbquery in your .fixtures.yml? A link to
your project would make debugging easier.

Best regards,
-g


-- 
Garrett Honeycutt
@learnpuppet
Puppet Training with LearnPuppet.com
Mobile: +1.206.414.8658

-- 
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/cbe019bf-e5bc-c19c-177a-9d2e5492a080%40garretthoneycutt.com.
For more options, visit https://groups.google.com/d/optout.


[Puppet Users] Spec testing and dalen-puppetdbquery

2016-11-01 Thread Peter Berghold
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 -- puppet/util/puppetdb"

After a bit of searching I am still left wondering package or gem this is
looking for.  Anybody know?

-- 
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/CAArvnv1kYWtuZuybLvDnSS4Mt2vG0P0xqx9%3D1z-X5vMop0VC6A%40mail.gmail.com.
For more options, visit https://groups.google.com/d/optout.