forked from theforeman/puppet-foreman
-
Notifications
You must be signed in to change notification settings - Fork 0
/
foreman_install_spec.rb
52 lines (39 loc) · 1.48 KB
/
foreman_install_spec.rb
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
require 'spec_helper'
describe 'foreman' do
on_supported_os.each do |os, facts|
context "on #{os}" do
let(:facts) { facts }
let(:params) { {} }
describe 'with version' do
let(:params) { super().merge(version: 'latest') }
it { should_not contain_foreman__repos('foreman') }
it { should contain_package('foreman-postgresql').with_ensure('latest') }
end
describe 'with repo' do
let(:pre_condition) { 'include foreman::repo' }
it { should contain_package('foreman-postgresql').that_requires('Anchor[foreman::repo]') }
end
describe 'sidekiq jobs' do
context 'with dynflow_manage_service disabled' do
let(:params) { super().merge(dynflow_manage_services: false) }
it { is_expected.not_to contain_package('foreman-dynflow-sidekiq') }
end
context 'with dynflow_manage_service enabled' do
let(:params) { super().merge(dynflow_manage_services: true) }
it { is_expected.to contain_package('foreman-dynflow-sidekiq') }
end
end
context 'with SELinux' do
let(:facts) { override_facts(super(), os: {'selinux' => {'enabled' => selinux}}) }
context 'enabled' do
let(:selinux) { true }
it { should contain_package('foreman-selinux') }
end
context 'disabled' do
let(:selinux) { false }
it { should_not contain_package('foreman-selinux') }
end
end
end
end
end