Created
August 29, 2014 11:55
-
-
Save msapariya/eca9f77c9f560f8a0e57 to your computer and use it in GitHub Desktop.
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
class kp_ls( | |
#$somevar = $kp_ls::params::somevar, | |
#$somevar1 = $kp_ls::params::somevar1, | |
) inherits kp_ls::params { | |
notify { 'foo': } | |
notify { 'foo1': message => hiera('foo_message') } | |
} |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
require 'spec_helper' | |
describe 'kp_ls', :type => :class do | |
let(:node) { 'testhost.example.com' } | |
let(:hiera_config) do | |
{ :backends => ['yaml'], | |
:hierarchy => [ | |
'%{fqdn}/%{fqdn}', | |
'%{fqdn}/%{calling_module}', | |
'%{calling_module}', | |
], | |
:yaml => { | |
:datadir => File.expand_path(File.join(__FILE__, '..', '..', '..', 'hieradata')) }} | |
end | |
it { should compile } | |
it { should compile.with_all_deps } | |
it { should contain_notify('foo') } | |
#let(:hiera_data) { { :foo_message => "bar" } } | |
it { should contain_notify("foo1").with_message("bar") } | |
end |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
class kp_ls::params() { | |
$somevar = 1 | |
$somevar1 = 2 | |
} |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
FFFF | |
Failures: | |
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)>' | |
2) kp_ls | |
Failure/Error: it { should compile.with_all_deps } | |
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:18:in `block (2 levels) in <top (required)>' | |
3) kp_ls | |
Failure/Error: it { should contain_notify('foo') } | |
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:19:in `block (2 levels) in <top (required)>' | |
4) kp_ls | |
Failure/Error: it { should contain_notify("foo1").with_message("bar") } | |
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:23:in `block (2 levels) in <top (required)>' | |
4 deprecations logged to a.txt | |
Finished in 0.36036 seconds (files took 1.63 seconds to load) | |
4 examples, 4 failures |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
did you get anywhere with this? i am having the same problems.