diff options
| author | Can Eldem <celdem@gitlab.com> | 2020-09-02 10:20:37 +0000 |
|---|---|---|
| committer | Can Eldem <celdem@gitlab.com> | 2020-09-02 10:20:37 +0000 |
| commit | 178dc1c91f9e43ee061825d1284bca694d6bbc65 (patch) | |
| tree | 99b53a90cd7c0996a2d0993b41eb56a695bcc996 /spec/integration/java/maven_spec.rb | |
| parent | eb11eeb1018c4d32e8dbaf3f734e588205f0671f (diff) | |
| parent | cbc4d1e328fd0e578f038d57fbd6b9354dafa79e (diff) | |
Merge branch '217897-offline-rubies' into 'master'v3.25.0
Install tools from Debian package.
See merge request gitlab-org/security-products/license-management!188
Diffstat (limited to 'spec/integration/java/maven_spec.rb')
| -rw-r--r-- | spec/integration/java/maven_spec.rb | 42 |
1 files changed, 0 insertions, 42 deletions
diff --git a/spec/integration/java/maven_spec.rb b/spec/integration/java/maven_spec.rb index 65d8bf5..217035d 100644 --- a/spec/integration/java/maven_spec.rb +++ b/spec/integration/java/maven_spec.rb @@ -114,48 +114,6 @@ RSpec.describe "maven" do specify { expect(report.licenses_for('jackson-core')).to match_array(['Apache-2.0']) } end - context "when specifying the version of java using environment variables" do - let(:output_file) { Pathname.new(runner.project_path.join('output.txt')) } - - before do - runner.add_file('custom.sh') do - <<~SCRIPT - #!/bin/bash -l - - java -version &> '#{output_file}' - SCRIPT - end - end - - it 'prioritizes `LM_JAVA_VERSION` over the `ASDF_JAVA_VERSION`' do - runner.scan(env: { - 'ASDF_JAVA_VERSION' => 'adopt-openjdk-11.0.7+10', - 'LM_JAVA_VERSION' => '8', - 'SETUP_CMD' => 'bash custom.sh' - }) - - expect(output_file).to exist - expect(output_file.read).to include('openjdk version "1.8.0_252"') - end - - it 'reads the ASDF_JAVA_VERSION' do - runner.scan(env: { - 'ASDF_JAVA_VERSION' => 'adopt-openjdk-11.0.7+10.1', - 'SETUP_CMD' => 'bash custom.sh' - }) - - expect(output_file).to exist - expect(output_file.read).to include('openjdk version "11.0.7"') - end - - it 'defaults to java 8' do - runner.scan(env: { 'SETUP_CMD' => 'bash custom.sh' }) - - expect(output_file).to exist - expect(output_file.read).to include('openjdk version "1.8.0_252"') - end - end - [ { java: '8', maven: ['3.6.3', '3.5.4', '3.3.9', '3.2.5'] }, { java: '11', maven: ['3.6.3', '3.5.4', '3.3.9', '3.2.5'] } |
