Ask Your Question
0

Rspec and puppet stdlib functions

asked 2014-01-27 06:02:25 -0500

vyacheslav.artyukhov gravatar image

Good day!
I try to test a module that uses stdlib's functions, such as validatearray and validatestring.
But I get following error:

Failures:
1) ganglia::gmetad with clusters 
 Failure/Error: should include_class('ganglia::gmetad')
 Puppet::Error:
   Unknown function validate_array at /home/vyacheslav/gepetto-workspace/modules/ganglia/spec/fixtures/modules/ganglia/manifests/gmetad.pp:52 on node vyacheslav-hp-elitebook-8440p
 # ./spec/classes/gmetad_spec.rb:17:in `block (3 levels) in <top (required)>'

How can I tell to rspec where stdlib's functions are located?

edit retag flag offensive close merge delete

Comments

did you fill out the dependencies in the Modulefile?

dgutierrez1287 gravatar imagedgutierrez1287 ( 2014-01-27 09:58:24 -0500 )edit

1 Answer

Sort by ยป oldest newest most voted
2

answered 2014-01-27 11:27:03 -0500

doc75 gravatar image

If you use puppetlabsspec helper, you need to add a .fixtures.yml file that indicates the dependancy: https://github.com/puppetlabs/puppetlabsspechelper#using-fixtures

Hope this helps.

edit flag offensive delete link more

Your Answer

Please start posting anonymously - your entry will be published after you log in or create a new account.

Add Answer

Question Tools

1 follower

Stats

Asked: 2014-01-27 06:02:25 -0500

Seen: 830 times

Last updated: Jan 27 '14