Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

set manage_repo for Oracle "RedHat" (and not 5.x for any flavor anymore, for consistency with rest of module) #1077

Merged
merged 1 commit into from
Apr 13, 2017
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
2 changes: 1 addition & 1 deletion manifests/params.pp
Original file line number Diff line number Diff line change
Expand Up @@ -49,7 +49,7 @@
}
}
'RedHat': {
if ($::operatingsystem in ['RedHat', 'CentOS'] and $::operatingsystemmajrelease in ['5', '6', '7']) {
if ($::operatingsystem in ['RedHat', 'CentOS', 'Oracle'] and $::operatingsystemmajrelease in ['6', '7']) {
$_module_os_overrides = {
'manage_repo' => true,
'log_group' => 'nginx',
Expand Down
13 changes: 2 additions & 11 deletions spec/classes/nginx_spec.rb
Original file line number Diff line number Diff line change
Expand Up @@ -109,19 +109,10 @@
it { is_expected.not_to contain_yumrepo('nginx-release') }
end

context 'operatingsystemmajrelease = 5' do
let(:facts) { { operatingsystem: operatingsystem, osfamily: 'RedHat', operatingsystemmajrelease: '5' } }
it { is_expected.to contain_package('nginx') }
it do
is_expected.to contain_yumrepo('nginx-release').with(
'baseurl' => "http://nginx.org/packages/#{operatingsystem == 'CentOS' ? 'centos' : 'rhel'}/5/$basearch/"
)
end
end

context 'RedHat / CentOS 5 with package_source => passenger' do
let(:facts) { { operatingsystem: operatingsystem, osfamily: 'RedHat', operatingsystemmajrelease: '5' } }
let(:params) { { package_source: 'passenger' } }

let(:params) { { package_source: 'passenger', manage_repo: true } }
it 'we fail' do
expect { catalogue }.to raise_error(Puppet::Error, %r{is unsupported with \$package_source})
end
Expand Down