Ask Your Question
0

Rspec hosts directory

asked 2014-01-29 09:34:22 -0500

vyacheslav.artyukhov gravatar image

Good day!
I use rspec for testing modules and I found that there is spec/hosts directory. What is its purpose?
I have 2 test environments and 2 manifests for them: testing.pp and testing2.pp. Each environment contains several hosts. I want to test hosts - assert that hosts have necessary services and resources. How can I do it using puppet-rspec?

edit retag flag offensive close merge delete

1 answer

Sort by ยป oldest newest most voted
0

answered 2014-04-19 18:40:09 -0500

solarkennedy gravatar image

See "Testing hosts" in http://rspec-puppet.com/tutorial/

You can setup hosts in tests/site.pp, and then add rspec tests in spec/hosts/myhost_spec.rb and make assertions about what classes it should have.

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-29 09:34:22 -0500

Seen: 235 times

Last updated: Apr 19 '14