Created
June 24, 2014 20:01
-
-
Save slyness/92148f9906cb8e4d793d to your computer and use it in GitHub Desktop.
This file contains hidden or 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 "serverspec" | |
| require "net/http" | |
| require "uri" | |
| include Serverspec::Helper::Exec | |
| include Serverspec::Helper::DetectOS | |
| RSpec.configure do |c| | |
| c.before :all do | |
| c.path = "/sbin:/usr/sbin" | |
| end | |
| end | |
| %w[ | |
| check-http.rb | |
| check-haproxy.rb | |
| check-banner.rb | |
| check-socket.rb | |
| check-dns.rb | |
| ].each do |plugin| | |
| describe file(File.join("/etc/sensu/plugins", plugin)) do | |
| it { should be_file } | |
| it { should be_mode 755 } | |
| it { should be_owned_by "root" } | |
| it { should be_grouped_into "sensu" } | |
| end | |
| end | |
| describe file("/etc/sensu/handlers/pagerduty.rb") do | |
| it { should be_file } | |
| it { should be_mode 755 } | |
| it { should be_owned_by "root" } | |
| it { should be_grouped_into "sensu" } | |
| end | |
| describe file("/etc/sensu/extensions/system_profile.rb") do | |
| it { should be_file } | |
| it { should be_mode 755 } | |
| it { should be_owned_by "root" } | |
| it { should be_grouped_into "sensu" } | |
| end |
Author
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
This is a server spec test file called assest which includes spec_helper and tests