do not use unportable readlink utility to find the java_default_home,

use Ruby in a more portable fashion.

adapt tests as well
This commit is contained in:
Sebastian Reitenbach
2017-09-26 23:35:15 +02:00
committed by Will Meek
parent bdfc567c18
commit e50eb64614
4 changed files with 36 additions and 45 deletions

View File

@@ -236,7 +236,7 @@ describe 'java', :type => :class do
context 'select jdk for OpenBSD' do
let(:facts) { {:osfamily => 'OpenBSD', :architecture => 'x86_64'} }
it { is_expected.to contain_package('java').with_name('jdk') }
it { is_expected.to contain_file_line('java-home-environment').with_line('JAVA_HOME=/usr/local/jdk/') }
it { is_expected.to_not contain_file_line('java-home-environment') }
end
context 'select jre for OpenBSD' do