diff options
| author | Can Eldem <celdem@gitlab.com> | 2020-07-22 08:45:02 +0000 |
|---|---|---|
| committer | Can Eldem <celdem@gitlab.com> | 2020-07-22 08:45:02 +0000 |
| commit | ca675527b53c2a8316c962ee1a17bc1ee1c0c156 (patch) | |
| tree | d350d872ebf69f0b07ecf6497011c345205d11f7 /spec/support | |
| parent | e1bb260b43763a36536b7d3fa4d73108ffb604d4 (diff) | |
| parent | 0e7c92f64a4f910da3266be167fcf28dccb76689 (diff) | |
Merge branch '224187-add-maven-tests' into 'master'v3.19.1
Update maven/gradle offline tests
See merge request gitlab-org/security-products/license-management!195
Diffstat (limited to 'spec/support')
| -rw-r--r-- | spec/support/integration_test_helper.rb | 6 | ||||
| -rw-r--r-- | spec/support/proxy_helper.rb | 8 |
2 files changed, 5 insertions, 9 deletions
diff --git a/spec/support/integration_test_helper.rb b/spec/support/integration_test_helper.rb index 244f363..e482d6d 100644 --- a/spec/support/integration_test_helper.rb +++ b/spec/support/integration_test_helper.rb @@ -11,12 +11,6 @@ module IntegrationTestHelper end end - def private_maven_host - @private_maven_host ||= ENV.fetch('PRIVATE_MAVEN_HOST').tap do |host| - add_host(host, ENV.fetch('PRIVATE_MAVEN_IP')) - end - end - def runner(*args) @runner ||= ProjectHelper.new(*args) end diff --git a/spec/support/proxy_helper.rb b/spec/support/proxy_helper.rb index a07ee84..93805c6 100644 --- a/spec/support/proxy_helper.rb +++ b/spec/support/proxy_helper.rb @@ -5,9 +5,11 @@ module ProxyHelper def generate_self_signed_certificate_for(host) Dir.chdir License::Management.root.join('tmp') do - system("rm -f #{host}.*") - system("/usr/bin/openssl req -x509 -newkey rsa:4096 -keyout #{host}.key -out #{host}.crt -days 999 -nodes -subj '/C=/ST=/L=/O=/OU=/CN=*.test' -addext 'subjectAltName=DNS:nuget.test,DNS:rubygems.test,DNS:goproxy.test'") - system("cat #{host}.* > #{host}.pem") + system([ + "rm -f #{host}.*", + "/usr/bin/openssl req -x509 -newkey rsa:4096 -keyout #{host}.key -out #{host}.crt -days 999 -nodes -subj '/C=/ST=/L=/O=/OU=/CN=*.test' -addext 'subjectAltName=DNS:nuget.test,DNS:rubygems.test,DNS:goproxy.test,DNS:maven.test,DNS:pypi.test,DNS:npm.test'", + "cat #{host}.* > #{host}.pem" + ].join("&&")) end end |
