Turns out I had a typo:

Puppet::Type.type(:bmc).provide(:ipmitool) do
was
Puppet::Type.type(:bmc).provider(:ipmitool) do

Seems to work.

Now how do I mock things like:

1. command :ipmitool
2. confine :is_virtual => "false"
3.   confine :true => File.exists?('/dev/ipmi0') || 
File.exists?('/dev/ipmi/0') || File.exists?('/dev/ipmidev/0')

Corey
On Sunday, September 15, 2013 6:20:49 PM UTC-7, Corey Osman wrote:
>
> Hi,
>
> I am been trying really hard to test my custom type/provider.  Every 
> example seems to not fit my case though.  Most of the examples only cover 
> the providers or puppet code.  
>
> My case is a type and provider combined.  
>
>
> The puppet_labs_spec_helper has at least helped me out. I have been 
> following this doc: 
> https://puppetlabs.com/blog/the-next-generation-of-puppet-module-testing
>  But I still can't get the most basic test to run.  I am assuming this is 
> an environment issue as the puppet labs_apache module seems to test just 
> fine on my machine and I have tried to borrow and copy the layout as much 
> as possible.
>
>
> Could someone explicitly detail the steps required to test my code?  Maybe 
> even clone my repo and run: rake spec_prep && rake spec
>
> git clone https://github.com/logicminds/bmclib
>
> Stuck at the following errors:
> error: https://gist.github.com/logicminds/6575668 (puppet 3.3.0)
> load error: https://gist.github.com/logicminds/6575704  (puppet 3.2.4)
>
> thanks,
>
> Corey
>
>
>
>
>
>
>
>
>

-- 
You received this message because you are subscribed to the Google Groups 
"Puppet Developers" group.
To unsubscribe from this group and stop receiving emails from it, send an email 
to [email protected].
To post to this group, send email to [email protected].
Visit this group at http://groups.google.com/group/puppet-dev.
For more options, visit https://groups.google.com/groups/opt_out.

Reply via email to