Project

General

Profile

« Previous | Next » 

Revision dce8dedd

Added by Dominic Cleal over 10 years ago

Restrict SCL/EPEL to appropriate OS, add package dependencies

View differences:

spec/classes/foreman_install_spec.rb
end
it { should contain_foreman__install__repos('foreman') }
it { should contain_package('foreman-postgresql').with({
'require' => 'Foreman::Install::Repos[foreman]',
'ensure' => 'present',
it { should contain_class('foreman::install::repos::extra').with({
:configure_scl_repo => true,
:configure_epel_repo => true,
})}
it { should contain_package('foreman-postgresql').with_ensure('present') }
it { should contain_package('foreman-postgresql').that_requires('Foreman::Install::Repos[foreman]') }
it { should contain_package('foreman-postgresql').that_requires('Class[foreman::install::repos::extra]') }
end
describe 'with version' do
......
it { should contain_foreman__install__repos('foreman') }
it { should contain_package('foreman-postgresql').with({
'require' => 'Foreman::Install::Repos[foreman]',
'ensure' => 'latest',
})}
it { should contain_package('foreman-postgresql').with_ensure('latest') }
it { should contain_package('foreman-postgresql').that_requires('Foreman::Install::Repos[foreman]') }
end
describe 'with custom repo' do
......
it { should_not contain_foreman__install__repos('foreman') }
it { should contain_package('foreman-postgresql').with_require([]) }
it { should contain_package('foreman-postgresql').that_requires('Class[foreman::install::repos::extra]') }
end
describe 'with sqlite' do
......
}"
end
it { should contain_package('foreman-sqlite').with_require('Foreman::Install::Repos[foreman]') }
it { should contain_package('foreman-sqlite').that_requires('Foreman::Install::Repos[foreman]') }
it { should contain_package('foreman-sqlite').that_requires('Class[foreman::install::repos::extra]') }
end
describe 'with postgresql' do
......
}"
end
it { should contain_package('foreman-postgresql').with_require('Foreman::Install::Repos[foreman]') }
it { should contain_package('foreman-postgresql').that_requires('Foreman::Install::Repos[foreman]') }
it { should contain_package('foreman-postgresql').that_requires('Class[foreman::install::repos::extra]') }
end
describe 'with mysql' do
......
}"
end
it { should contain_package('foreman-mysql2').with_require('Foreman::Install::Repos[foreman]') }
it { should contain_package('foreman-mysql2').that_requires('Foreman::Install::Repos[foreman]') }
it { should contain_package('foreman-mysql2').that_requires('Class[foreman::install::repos::extra]') }
end
context 'with SELinux enabled' do
......
let :pre_condition do
"class {'foreman': }"
end
it { should contain_package('foreman-selinux').with_require('Foreman::Install::Repos[foreman]') }
it { should contain_package('foreman-selinux').that_requires('Foreman::Install::Repos[foreman]') }
it { should contain_package('foreman-selinux').that_requires('Class[foreman::install::repos::extra]') }
end
describe 'with selinux false' do
......
selinux => true,
}"
end
it { should contain_package('foreman-selinux').with_require('Foreman::Install::Repos[foreman]') }
it { should contain_package('foreman-selinux').that_requires('Foreman::Install::Repos[foreman]') }
it { should contain_package('foreman-selinux').that_requires('Class[foreman::install::repos::extra]') }
end
end
......
selinux => true,
}"
end
it { should contain_package('foreman-selinux').with_require('Foreman::Install::Repos[foreman]') }
it { should contain_package('foreman-selinux').that_requires('Foreman::Install::Repos[foreman]') }
it { should contain_package('foreman-selinux').that_requires('Class[foreman::install::repos::extra]') }
end
end
end
context 'on debian' do
......
end
it { should contain_foreman__install__repos('foreman') }
it { should contain_package('foreman-postgresql').with({
'require' => 'Foreman::Install::Repos[foreman]',
'ensure' => 'present',
it { should contain_class('foreman::install::repos::extra').with({
:configure_scl_repo => true,
:configure_epel_repo => true,
})}
it { should contain_package('foreman-postgresql').with_ensure('present') }
it { should contain_package('foreman-postgresql').that_requires('Foreman::Install::Repos[foreman]') }
it { should contain_package('foreman-postgresql').that_requires('Class[foreman::install::repos::extra]') }
end
describe 'with version' do
......
it { should contain_foreman__install__repos('foreman') }
it { should contain_package('foreman-postgresql').with({
'require' => 'Foreman::Install::Repos[foreman]',
'ensure' => 'latest',
})}
it { should contain_package('foreman-postgresql').with_ensure('latest') }
it { should contain_package('foreman-postgresql').that_requires('Foreman::Install::Repos[foreman]') }
it { should contain_package('foreman-postgresql').that_requires('Class[foreman::install::repos::extra]') }
end
describe 'with custom repo' do
......
end
it { should_not contain_foreman__install__repos('foreman') }
it { should contain_package('foreman-postgresql').with_require([]) }
it { should contain_package('foreman-postgresql').that_requires('Class[foreman::install::repos::extra]') }
end
describe 'with sqlite' do
......
}"
end
it { should contain_package('foreman-sqlite3').with_require('Foreman::Install::Repos[foreman]') }
it { should contain_package('foreman-sqlite3').that_requires('Foreman::Install::Repos[foreman]') }
it { should contain_package('foreman-sqlite3').that_requires('Class[foreman::install::repos::extra]') }
end
describe 'with postgresql' do
......
}"
end
it { should contain_package('foreman-postgresql').with_require('Foreman::Install::Repos[foreman]') }
it { should contain_package('foreman-postgresql').that_requires('Foreman::Install::Repos[foreman]') }
it { should contain_package('foreman-postgresql').that_requires('Class[foreman::install::repos::extra]') }
end
describe 'with mysql' do
......
}"
end
it { should contain_package('foreman-mysql2').with_require('Foreman::Install::Repos[foreman]') }
it { should contain_package('foreman-mysql2').that_requires('Foreman::Install::Repos[foreman]') }
it { should contain_package('foreman-mysql2').that_requires('Class[foreman::install::repos::extra]') }
end
end
end

Also available in: Unified diff