[FM-6963] Removal of unsupported OS from java
This commit is contained in:
@@ -38,43 +38,6 @@ describe 'java', type: :class do
|
||||
it { is_expected.to contain_exec('update-java-alternatives').with_command('alternatives --set java /usr/java/jre1.7.0_67/bin/java') }
|
||||
end
|
||||
|
||||
context 'when select openjdk for Fedora 20' do
|
||||
let(:facts) { { osfamily: 'RedHat', operatingsystem: 'Fedora', operatingsystemrelease: '20', architecture: 'x86_64' } }
|
||||
|
||||
it { is_expected.to contain_package('java').with_name('java-1.7.0-openjdk-devel') }
|
||||
it { is_expected.to contain_file_line('java-home-environment').with_line('JAVA_HOME=/usr/lib/jvm/java-1.7.0-openjdk-x86_64/') }
|
||||
end
|
||||
|
||||
context 'when select openjdk for Fedora 21' do
|
||||
let(:facts) { { osfamily: 'RedHat', operatingsystem: 'Fedora', operatingsystemrelease: '21', architecture: 'x86_64' } }
|
||||
|
||||
it { is_expected.to contain_package('java').with_name('java-1.8.0-openjdk-devel') }
|
||||
it { is_expected.to contain_file_line('java-home-environment').with_line('JAVA_HOME=/usr/lib/jvm/java-1.8.0-openjdk-x86_64/') }
|
||||
end
|
||||
|
||||
context 'when select passed value for Fedora 20' do
|
||||
let(:facts) { { osfamily: 'RedHat', operatingsystem: 'Fedora', operatingsystemrelease: '20', architecture: 'x86_64' } }
|
||||
let(:params) { { 'distribution' => 'jre', 'java_home' => '/usr/local/lib/jre/' } }
|
||||
|
||||
it { is_expected.to contain_package('java').with_name('java-1.7.0-openjdk') }
|
||||
it { is_expected.to contain_file_line('java-home-environment').with_line('JAVA_HOME=/usr/local/lib/jre/') }
|
||||
end
|
||||
|
||||
context 'when select passed value for Fedora 21' do
|
||||
let(:facts) { { osfamily: 'RedHat', operatingsystem: 'Fedora', operatingsystemrelease: '21', architecture: 'x86_64' } }
|
||||
let(:params) { { 'distribution' => 'jre', 'java_home' => '/usr/local/lib/jre/' } }
|
||||
|
||||
it { is_expected.to contain_package('java').with_name('java-1.8.0-openjdk') }
|
||||
it { is_expected.to contain_file_line('java-home-environment').with_line('JAVA_HOME=/usr/local/lib/jre/') }
|
||||
end
|
||||
|
||||
context 'when select passed value for Fedora 21 with yum option' do
|
||||
let(:facts) { { osfamily: 'RedHat', operatingsystem: 'Fedora', operatingsystemrelease: '21', architecture: 'x86_64' } }
|
||||
let(:params) { { 'distribution' => 'jre', 'package_options' => ['--skip-broken'] } }
|
||||
|
||||
it { is_expected.to contain_package('java') }
|
||||
end
|
||||
|
||||
context 'when select passed value for Centos 5.3' do
|
||||
let(:facts) { { osfamily: 'RedHat', operatingsystem: 'Centos', operatingsystemrelease: '5.3', architecture: 'x86_64' } }
|
||||
let(:params) { { 'package' => 'jdk', 'java_home' => '/usr/local/lib/jre' } }
|
||||
@@ -90,81 +53,6 @@ describe 'java', type: :class do
|
||||
it { is_expected.not_to contain_exec('update-java-alternatives') }
|
||||
end
|
||||
|
||||
context 'when select default for Debian Wheezy' do
|
||||
let(:facts) { { osfamily: 'Debian', operatingsystem: 'Debian', lsbdistcodename: 'wheezy', operatingsystemrelease: '7.1', architecture: 'amd64' } }
|
||||
|
||||
it { is_expected.to contain_package('java').with_name('openjdk-7-jdk') }
|
||||
it { is_expected.to contain_exec('update-java-alternatives').with_command('update-java-alternatives --set java-1.7.0-openjdk-amd64 --jre') }
|
||||
it { is_expected.to contain_file_line('java-home-environment').with_line('JAVA_HOME=/usr/lib/jvm/java-1.7.0-openjdk-amd64/') }
|
||||
end
|
||||
|
||||
context 'when select Oracle JRE for Debian Wheezy' do
|
||||
let(:facts) { { osfamily: 'Debian', operatingsystem: 'Debian', lsbdistcodename: 'wheezy', operatingsystemrelease: '7.1', architecture: 'amd64' } }
|
||||
let(:params) { { 'distribution' => 'oracle-jre' } }
|
||||
|
||||
it { is_expected.to contain_package('java').with_name('oracle-j2re1.7') }
|
||||
it { is_expected.to contain_exec('update-java-alternatives').with_command('update-java-alternatives --set j2re1.7-oracle --jre') }
|
||||
it { is_expected.to contain_file_line('java-home-environment').with_line('JAVA_HOME=/usr/lib/jvm/j2re1.7-oracle/') }
|
||||
end
|
||||
|
||||
context 'when select Oracle Java 8 JRE >=u100 for Debian Wheezy' do
|
||||
let(:facts) { { osfamily: 'Debian', operatingsystem: 'Debian', lsbdistcodename: 'wheezy', operatingsystemrelease: '7.1', architecture: 'amd64' } }
|
||||
let(:params) { { 'distribution' => 'oracle-java8-jre' } }
|
||||
|
||||
it { is_expected.to contain_package('java').with_name('oracle-java8-jre') }
|
||||
it { is_expected.to contain_exec('update-java-alternatives').with_command('update-java-alternatives --set jre-8-oracle-x64 --jre') }
|
||||
end
|
||||
|
||||
context 'when select Oracle Java 8 JDK >=u100 for Debian Wheezy' do
|
||||
let(:facts) { { osfamily: 'Debian', operatingsystem: 'Debian', lsbdistcodename: 'wheezy', operatingsystemrelease: '7.1', architecture: 'amd64' } }
|
||||
let(:params) { { 'distribution' => 'oracle-java8-jdk' } }
|
||||
|
||||
it { is_expected.to contain_package('java').with_name('oracle-java8-jdk') }
|
||||
it { is_expected.to contain_exec('update-java-alternatives').with_command('update-java-alternatives --set jdk-8-oracle-x64 --jre') }
|
||||
end
|
||||
|
||||
context 'when select OpenJDK JRE for Debian Wheezy' do
|
||||
let(:facts) { { osfamily: 'Debian', operatingsystem: 'Debian', lsbdistcodename: 'wheezy', operatingsystemrelease: '7.1', architecture: 'amd64' } }
|
||||
let(:params) { { 'distribution' => 'jre' } }
|
||||
|
||||
it { is_expected.to contain_package('java').with_name('openjdk-7-jre-headless') }
|
||||
it { is_expected.to contain_exec('update-java-alternatives').with_command('update-java-alternatives --set java-1.7.0-openjdk-amd64 --jre-headless') }
|
||||
it { is_expected.to contain_file_line('java-home-environment').with_line('JAVA_HOME=/usr/lib/jvm/java-1.7.0-openjdk-amd64/') }
|
||||
end
|
||||
|
||||
context 'when select default for Debian Squeeze' do
|
||||
let(:facts) { { osfamily: 'Debian', operatingsystem: 'Debian', lsbdistcodename: 'squeeze', operatingsystemrelease: '6.0.5', architecture: 'amd64' } }
|
||||
|
||||
it { is_expected.to contain_package('java').with_name('openjdk-6-jdk') }
|
||||
it { is_expected.to contain_exec('update-java-alternatives').with_command('update-java-alternatives --set java-6-openjdk-amd64 --jre') }
|
||||
end
|
||||
|
||||
context 'when select Oracle JRE for Debian Squeeze' do
|
||||
let(:facts) { { osfamily: 'Debian', operatingsystem: 'Debian', lsbdistcodename: 'squeeze', operatingsystemrelease: '6.0.5', architecture: 'amd64' } }
|
||||
let(:params) { { 'distribution' => 'sun-jre' } }
|
||||
|
||||
it { is_expected.to contain_package('java').with_name('sun-java6-jre') }
|
||||
it { is_expected.to contain_exec('update-java-alternatives').with_command('update-java-alternatives --set java-6-sun --jre') }
|
||||
it { is_expected.to contain_file_line('java-home-environment').with_line('JAVA_HOME=/usr/lib/jvm/java-6-sun/jre/') }
|
||||
end
|
||||
|
||||
context 'when select OpenJDK JRE for Debian Squeeze' do
|
||||
let(:facts) { { osfamily: 'Debian', operatingsystem: 'Debian', lsbdistcodename: 'squeeze', operatingsystemrelease: '6.0.5', architecture: 'amd64' } }
|
||||
let(:params) { { 'distribution' => 'jre' } }
|
||||
|
||||
it { is_expected.to contain_package('java').with_name('openjdk-6-jre-headless') }
|
||||
it { is_expected.to contain_exec('update-java-alternatives').with_command('update-java-alternatives --set java-6-openjdk-amd64 --jre-headless') }
|
||||
it { is_expected.to contain_file_line('java-home-environment').with_line('JAVA_HOME=/usr/lib/jvm/java-6-openjdk/jre/') }
|
||||
end
|
||||
|
||||
context 'when select random alternative for Debian Wheezy' do
|
||||
let(:facts) { { osfamily: 'Debian', operatingsystem: 'Debian', lsbdistcodename: 'wheezy', operatingsystemrelease: '7.1', architecture: 'amd64' } }
|
||||
let(:params) { { 'java_alternative' => 'bananafish' } }
|
||||
|
||||
it { is_expected.to contain_package('java').with_name('openjdk-7-jdk') }
|
||||
it { is_expected.to contain_exec('update-java-alternatives').with_command('update-java-alternatives --set bananafish --jre') }
|
||||
end
|
||||
|
||||
context 'when select jdk for Ubuntu Vivid (15.04)' do
|
||||
let(:facts) { { osfamily: 'Debian', operatingsystem: 'Ubuntu', lsbdistcodename: 'vivid', operatingsystemrelease: '15.04', architecture: 'amd64' } }
|
||||
let(:params) { { 'distribution' => 'jdk' } }
|
||||
|
||||
Reference in New Issue
Block a user