DESCRIPTION Used local runner to perform the following tasks on my Arch Linux dev machine 1. Check if apache is installed on arch 2. Check if httpd service is enabled and running 3. Check if port 80 is listening COMMENTS Limited capabilities but seems to have support for basic testing on mulitple environments: local, SSH and Docker API using multiple configuration management tools like Puppet and Ansible. REFERENCES [0]: https://serverspec.org/tutorial.html [1]: https://serverspec.org/resource_types.html
37 lines
833 B
Ruby
37 lines
833 B
Ruby
require 'spec_helper'
|
|
|
|
describe package('apache'), if: os[:family] == 'arch' do
|
|
it { should be_installed }
|
|
end
|
|
|
|
describe service('httpd'), if: os[:family] == 'arch' do
|
|
it { should be_enabled }
|
|
it { should be_running }
|
|
end
|
|
|
|
describe package('httpd'), if: os[:family] == 'redhat' do
|
|
it { should be_installed }
|
|
end
|
|
|
|
describe package('apache2'), if: os[:family] == 'ubuntu' do
|
|
it { should be_installed }
|
|
end
|
|
|
|
describe service('httpd'), if: os[:family] == 'redhat' do
|
|
it { should be_enabled }
|
|
it { should be_running }
|
|
end
|
|
|
|
describe service('apache2'), if: os[:family] == 'ubuntu' do
|
|
it { should be_enabled }
|
|
it { should be_running }
|
|
end
|
|
|
|
describe service('org.apache.httpd'), if: os[:family] == 'darwin' do
|
|
it { should be_enabled }
|
|
it { should be_running }
|
|
end
|
|
|
|
describe port(80) do
|
|
it { should be_listening }
|
|
end
|