Hi Manish,

On 29.08.2014, at 14:07, Manish Sapariya <msapar...@gmail.com> wrote:

> Hi,
> I have two classes as posted in this gist.
> 
> https://gist.github.com/msapariya/eca9f77c9f560f8a0e57
> 
> kp_ls derives from params and defines two variables.
> 
> I am using hiera-puppet-helper in my specs to run hiera
> related tests.

Do you know that rspec-puppet has direct hiera support?
There is no need for the hiera-puppet-herlper anymore:

https://github.com/rodjek/rspec-puppet/pull/125
merged on Dec 4th 2013

Documentation is available on the respec-puppet site

https://github.com/rodjek/rspec-puppet/pull/134
merged on Dec 9th 2013

There is also a blog article on how to make use of rspec-puppet with hiera 
automatic lookups.
For overwriting hiera variables you only have to add the params hash into your 
spec file.

hth,

Martin


> 
> However the test is failing with 
> 
>  1) kp_ls
>      Failure/Error: it { should compile }
>      Puppet::Error:
>        Error from DataBinding 'hiera' while looking up 'kp_ls::somevar': 
> FileSystem implementation expected Pathname, got: 'Hash' on node 
> testhost.example.com
>      # ./spec/classes/init_spec.rb:17:in `block (2 levels) in <top 
> (required)>'
> 
> 
> If I disable the class parameters, the tests are running fine.
> I could not get any clue from code or even googling the issue.
> 
> Thanks for any help.
> Regards,
> Manish
> 
> -- 
> 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/7bb2d34f-ec1f-4a9a-be3b-2b4ee1890e03%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/7197E28E-FD87-49BA-9A9B-5F89F1EDFB7D%40gmail.com.
For more options, visit https://groups.google.com/d/optout.

Reply via email to