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:
|
fixtures:
|
||||||
repositories:
|
repositories:
|
||||||
"apache": "git://github.com/puppetlabs/puppetlabs-apache.git"
|
"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"
|
"stdlib": "git://github.com/puppetlabs/puppetlabs-stdlib.git"
|
||||||
symlinks:
|
symlinks:
|
||||||
"horizon": "#{source_dir}"
|
"horizon": "#{source_dir}"
|
||||||
|
@ -12,28 +12,32 @@ describe 'horizon' do
|
|||||||
'include apache'
|
'include apache'
|
||||||
end
|
end
|
||||||
|
|
||||||
describe 'when running on redhat' do
|
|
||||||
let :facts do
|
let :facts do
|
||||||
{
|
{ :concat_basedir => '/var/lib/puppet/concat' }
|
||||||
'osfamily' => 'RedHat'
|
|
||||||
}
|
|
||||||
end
|
end
|
||||||
|
|
||||||
it {
|
describe 'on RedHat platforms' do
|
||||||
should contain_service('httpd').with_name('httpd')
|
before do
|
||||||
}
|
facts.merge!({
|
||||||
|
:osfamily => 'RedHat',
|
||||||
|
:operatingsystemrelease => '6.0'
|
||||||
|
})
|
||||||
end
|
end
|
||||||
|
|
||||||
describe 'when running on debian' do
|
it { should contain_service('httpd').with_name('httpd') }
|
||||||
let :facts do
|
it { should contain_file('/etc/httpd/conf.d/openstack-dashboard.conf') }
|
||||||
{
|
|
||||||
'osfamily' => 'Debian'
|
|
||||||
}
|
|
||||||
end
|
end
|
||||||
|
|
||||||
it {
|
describe 'on Debian platforms' do
|
||||||
should contain_service('httpd').with_name('apache2')
|
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
|
describe 'with default parameters' do
|
||||||
it { should contain_file('/etc/openstack-dashboard/local_settings.py').with_content(/^SECRET_KEY = 'elj1IWiLoWHgcyYxFVLj7cM5rGOOxWl0'$/) }
|
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$/) }
|
it { should contain_file('/etc/openstack-dashboard/local_settings.py').with_content(/^\s*'can_set_mount_point': False$/) }
|
||||||
end
|
end
|
||||||
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
|
end
|
||||||
|
Loading…
Reference in New Issue
Block a user