Last active
October 10, 2016 15:39
-
-
Save gregohardy/c62562bffb2c7298e5180ae82249e06e to your computer and use it in GitHub Desktop.
Server spec
This file contains 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 'spec_helper' | |
require 'pry' | |
%w(serverspec rake).each do |package_name| | |
describe package(package_name) do | |
it { should be_installed.by('gem') } | |
end | |
end | |
[ | |
'ruby', | |
'ruby-devel', | |
'rubygems' | |
].each do |package_name| | |
describe package(package_name) do | |
it { should be_installed } | |
end | |
end | |
describe 'verify the PE version installed' do | |
it 'should be the specified version' do | |
result = command('cat pe_version') | |
expect(result.stdout).to match(/2016.3.0/) | |
end | |
end | |
[ | |
'pe-puppet', | |
'pe-activemq', | |
'pe-postgres', | |
'pe-webserver', | |
'peadmin', | |
'pe-puppetdb', | |
'pe-console-services', | |
'pe-orchestration-services' | |
].each do |username| | |
describe 'the user' do | |
it 'should exist' do | |
expect(user(username)).to exist | |
end | |
end | |
end |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment