Skip to content

Commit

Permalink
Merge pull request #562 from puppetlabs/CONT-1179-fix-build-failure
Browse files Browse the repository at this point in the history
(CONT-1179) - Fixing build failures
  • Loading branch information
jordanbreen28 authored Jun 30, 2023
2 parents f143cac + f402091 commit 5a0261a
Show file tree
Hide file tree
Showing 2 changed files with 12 additions and 2 deletions.
10 changes: 10 additions & 0 deletions manifests/init.pp
Original file line number Diff line number Diff line change
Expand Up @@ -110,6 +110,16 @@
default => '--jre'
}

# Enable legacy repo to install net-tools-deprecated package
# If SUSE OS major version is >= 15 and minor version is > 3
if ($facts['os']['family'] in ['SLES', 'SUSE']) and (versioncmp($facts['os']['release']['major'], '15') >= 0 and versioncmp($facts['os']['release']['minor'], '3') == 1) {
exec { 'Enable legacy repos':
path => '/bin:/usr/bin/:/sbin:/usr/sbin',
command => 'SUSEConnect --product sle-module-legacy/15.4/x86_64',
unless => 'SUSEConnect --status-text | grep sle-module-legacy/15.4/x86_64',
}
}

if $facts['os']['family'] == 'Debian' {
# Needed for update-java-alternatives
package { 'java-common':
Expand Down
4 changes: 2 additions & 2 deletions spec/classes/java_spec.rb
Original file line number Diff line number Diff line change
Expand Up @@ -144,14 +144,14 @@
end

context 'when selecting default for SLES 11.3' do
let(:facts) { { os: { family: 'Suse', name: 'SLES', release: { full: '11.3' }, architecture: 'x86_64' } } }
let(:facts) { { os: { family: 'Suse', name: 'SLES', release: { full: '11.3', major: '11', minor: '3' }, architecture: 'x86_64' } } }

it { is_expected.to contain_package('java').with_name('java-1_6_0-ibm-devel') }
it { is_expected.to contain_file_line('java-home-environment').with_line('JAVA_HOME=/usr/lib64/jvm/java-1.6.0-ibm-1.6.0/') }
end

context 'when selecting default for SLES 11.4' do
let(:facts) { { os: { family: 'Suse', name: 'SLES', release: { full: '11.4' }, architecture: 'x86_64' } } }
let(:facts) { { os: { family: 'Suse', name: 'SLES', release: { full: '11.4', major: '11', minor: '4' }, architecture: 'x86_64' } } }

it { is_expected.to contain_package('java').with_name('java-1_7_1-ibm-devel') }
it { is_expected.to contain_file_line('java-home-environment').with_line('JAVA_HOME=/usr/lib64/jvm/java-1.7.1-ibm-1.7.1/') }
Expand Down

0 comments on commit 5a0261a

Please sign in to comment.