From c8057b3b01baeaa10fcb075260901e63fdce449f Mon Sep 17 00:00:00 2001 From: mo khan Date: Tue, 15 Sep 2020 16:34:19 -0600 Subject: fix: install x509 cert into java 11 keystore --- spec/integration/java/maven_spec.rb | 36 +++++++++++++++++++----------------- 1 file changed, 19 insertions(+), 17 deletions(-) (limited to 'spec/integration/java') diff --git a/spec/integration/java/maven_spec.rb b/spec/integration/java/maven_spec.rb index 671243e..ca26d28 100644 --- a/spec/integration/java/maven_spec.rb +++ b/spec/integration/java/maven_spec.rb @@ -90,25 +90,27 @@ RSpec.describe "maven" do end end - context "when connecting to a custom package registry with a self signed certificate" do - let(:env) { { 'ADDITIONAL_CA_CERT_BUNDLE' => x509_certificate.read } } - - before do - runner.add_file('pom.xml') do - fixture_file_content('java/maven/pom-single.xml.erb', { - group_id: 'com.fasterxml.jackson.core', - artifact_id: 'jackson-core', - version: '2.10.0', - repository_id: 'custom', - repository_url: "https://maven.test/maven2" - }) + [8, 11].each do |java_version| + context "when connecting to a custom package registry with a self signed certificate using JAVA #{java_version}" do + let(:env) { { 'ADDITIONAL_CA_CERT_BUNDLE' => x509_certificate.read, 'LM_JAVA_VERSION' => java_version.to_s } } + + before do + runner.add_file('pom.xml') do + fixture_file_content('java/maven/pom-single.xml.erb', { + group_id: 'com.fasterxml.jackson.core', + artifact_id: 'jackson-core', + version: '2.10.0', + repository_id: 'custom', + repository_url: "https://maven.test/maven2" + }) + end end - end - specify do - expect(subject).to match_schema - expect(subject.dependency_names).to match_array(['jackson-core']) - expect(subject.licenses_for('jackson-core')).to match_array(['Apache-2.0']) + specify do + expect(subject).to match_schema + expect(subject.dependency_names).to match_array(['jackson-core']) + expect(subject.licenses_for('jackson-core')).to match_array(['Apache-2.0']) + end end end -- cgit v1.2.3