Fix rspec tests to support latest apache module

Latest apache module requires new dependencies: concat and firewall.

It now requires those facts:
* operatingsystemrelease
* concat_basedir (required by concat)

Change-Id: Ic561ec756c844c3b3cbe0c441a3d9a0d8c1abe9b
This commit is contained in:
Mathieu Gagné 2013-04-29 19:30:43 -04:00
parent 618f81dee6
commit 1f5c12f544
2 changed files with 24 additions and 32 deletions

View File

@ -1,6 +1,8 @@
fixtures:
repositories:
"apache": "git://github.com/puppetlabs/puppetlabs-apache.git"
"concat": "git://github.com/ripienaar/puppet-concat.git"
"firewall": "git://github.com/puppetlabs/puppetlabs-firewall.git"
"stdlib": "git://github.com/puppetlabs/puppetlabs-stdlib.git"
symlinks:
"horizon": "#{source_dir}"

View File

@ -12,28 +12,32 @@ describe 'horizon' do
'include apache'
end
describe 'when running on redhat' do
let :facts do
{
'osfamily' => 'RedHat'
}
{ :concat_basedir => '/var/lib/puppet/concat' }
end
it {
should contain_service('httpd').with_name('httpd')
}
describe 'on RedHat platforms' do
before do
facts.merge!({
:osfamily => 'RedHat',
:operatingsystemrelease => '6.0'
})
end
describe 'when running on debian' do
let :facts do
{
'osfamily' => 'Debian'
}
it { should contain_service('httpd').with_name('httpd') }
it { should contain_file('/etc/httpd/conf.d/openstack-dashboard.conf') }
end
it {
should contain_service('httpd').with_name('apache2')
}
describe 'on Debian platforms' do
before do
facts.merge!({
:osfamily => 'Debian',
:operatingsystemrelease => '6.0'
})
end
it { should contain_service('httpd').with_name('apache2') }
it { should_not contain_file('/etc/httpd/conf.d/openstack-dashboard.conf') }
describe 'with default parameters' do
it { should contain_file('/etc/openstack-dashboard/local_settings.py').with_content(/^SECRET_KEY = 'elj1IWiLoWHgcyYxFVLj7cM5rGOOxWl0'$/) }
@ -70,18 +74,4 @@ describe 'horizon' do
it { should contain_file('/etc/openstack-dashboard/local_settings.py').with_content(/^\s*'can_set_mount_point': False$/) }
end
end
describe 'vhost config' do
describe 'on debian' do
let :facts do
{:osfamily => 'Debian'}
end
it { should_not contain_file('/etc/httpd/conf.d/openstack-dashboard.conf') }
end
describe 'on redhat' do
let :facts do
{:osfamily => 'Redhat'}
end
it { should contain_file('/etc/httpd/conf.d/openstack-dashboard.conf') }
end
end
end