Skip to content

Instantly share code, notes, and snippets.

@gregohardy
Last active October 10, 2016 15:39
Show Gist options
  • Save gregohardy/c62562bffb2c7298e5180ae82249e06e to your computer and use it in GitHub Desktop.
Save gregohardy/c62562bffb2c7298e5180ae82249e06e to your computer and use it in GitHub Desktop.
Server spec
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