
Instead of keeping a local copy of spec_helper_acceptance.rb and requiring updates to all modules for any change, we can move it into the common helper gem and require it from there. This will make it easier to create and review changes that affect all puppet modules. Also change the Gemfile to look for the gem in the local workspace if running in a zuul environment. Change-Id: I1b9ca7f38920a2c901ae16f6302af9b3a1ab36b6 Depends-On: I18ed6cd2f8ee472a66cf580e3e183d14c00e6877
43 lines
894 B
Ruby
Executable File
43 lines
894 B
Ruby
Executable File
require 'puppet-openstack_infra_spec_helper/spec_helper_acceptance'
|
|
|
|
describe 'basic openstackci' do
|
|
|
|
if fact('osfamily') == 'Debian'
|
|
|
|
context 'default parameters' do
|
|
|
|
it 'should work with no errors' do
|
|
|
|
base_path = File.dirname(__FILE__)
|
|
pp_path = File.join(base_path, 'fixtures', 'default.pp')
|
|
pp = File.read(pp_path)
|
|
|
|
# Run it twice and test for idempotency
|
|
apply_manifest(pp, :catch_failures => true)
|
|
apply_manifest(pp, :catch_changes => true)
|
|
end
|
|
|
|
end
|
|
|
|
context 'installation of packages' do
|
|
|
|
describe package('apache2') do
|
|
it { should be_installed }
|
|
end
|
|
|
|
end
|
|
|
|
context 'files and directories' do
|
|
|
|
describe file('/etc/os_loganalyze/wsgi.conf') do
|
|
it { should be_file }
|
|
it { should be_owned_by 'root' }
|
|
it { should be_mode 440 }
|
|
end
|
|
|
|
end
|
|
|
|
end
|
|
|
|
end
|