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:
parent
618f81dee6
commit
1f5c12f544
@ -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}"
|
||||
|
@ -12,28 +12,32 @@ describe 'horizon' do
|
||||
'include apache'
|
||||
end
|
||||
|
||||
describe 'when running on redhat' do
|
||||
let :facts do
|
||||
{
|
||||
'osfamily' => 'RedHat'
|
||||
}
|
||||
end
|
||||
|
||||
it {
|
||||
should contain_service('httpd').with_name('httpd')
|
||||
}
|
||||
let :facts do
|
||||
{ :concat_basedir => '/var/lib/puppet/concat' }
|
||||
end
|
||||
|
||||
describe 'when running on debian' do
|
||||
let :facts do
|
||||
{
|
||||
'osfamily' => 'Debian'
|
||||
}
|
||||
describe 'on RedHat platforms' do
|
||||
before do
|
||||
facts.merge!({
|
||||
:osfamily => 'RedHat',
|
||||
:operatingsystemrelease => '6.0'
|
||||
})
|
||||
end
|
||||
|
||||
it {
|
||||
should contain_service('httpd').with_name('apache2')
|
||||
}
|
||||
it { should contain_service('httpd').with_name('httpd') }
|
||||
it { should contain_file('/etc/httpd/conf.d/openstack-dashboard.conf') }
|
||||
end
|
||||
|
||||
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
|
||||
|
Loading…
Reference in New Issue
Block a user