Ask Your Question

Rspec hosts directory

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

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

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

solarkennedy gravatar image

See "Testing hosts" in

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


Asked: 2014-01-29 09:34:22 -0600

Seen: 298 times

Last updated: Apr 19 '14