summaryrefslogtreecommitdiff
path: root/spec
diff options
context:
space:
mode:
Diffstat (limited to 'spec')
-rw-r--r--spec/gemnasium_maven_spec.rb15
1 files changed, 2 insertions, 13 deletions
diff --git a/spec/gemnasium_maven_spec.rb b/spec/gemnasium_maven_spec.rb
index 90fde6e..d84050a 100644
--- a/spec/gemnasium_maven_spec.rb
+++ b/spec/gemnasium_maven_spec.rb
@@ -13,20 +13,9 @@ RSpec.describe 'gemnasium-maven' do
let(:docker) { Docker.new(pwd: Pathname.pwd.join('src/gemnasium-maven')) }
let(:project_path) { project.path }
let(:docker_image) { 'gemnasium-maven:latest' }
- let(:env) { { 'ADDITIONAL_CA_CERT_BUNDLE' => x509, 'DS_JAVA_VERSION' => java_version } }
+ let(:env) { { 'ADDITIONAL_CA_CERT_BUNDLE' => x509.to_pem, 'DS_JAVA_VERSION' => java_version } }
let(:project) { Project.new }
- let(:x509) do
- rsa_key = OpenSSL::PKey::RSA.new(4096)
- certificate = OpenSSL::X509::Certificate.new
- certificate.subject = certificate.issuer = OpenSSL::X509::Name.parse("/C=/ST=/L=/O=/OU=/CN=")
- certificate.not_before = Time.now.to_i
- certificate.not_after = Time.now.to_i + 600
- certificate.public_key = rsa_key.public_key
- certificate.serial = 0x01
- certificate.version = 2
- certificate.sign(rsa_key, OpenSSL::Digest::SHA256.new)
- certificate.to_pem
- end
+ let(:x509) { X509.self_signed }
around(:example) do |example|
project.mount(dir: fixture_file('java/maven/custom-tls'))