summaryrefslogtreecommitdiff
path: root/spec/support
diff options
context:
space:
mode:
authormo khan <mo.khan@gmail.com>2020-07-20 15:55:59 -0600
committermo khan <mo.khan@gmail.com>2020-07-21 16:46:02 -0600
commitb3faccb3e3007ddfd41ef251ad8a925542fe2500 (patch)
treec2389439b9d41193079daf29a7bb82b6127e1e88 /spec/support
parente1bb260b43763a36536b7d3fa4d73108ffb604d4 (diff)
Update maven/gradle offline tests
* Let maven figure out the version of the license plugin that it is compatible with * Print the error when the setup fails * Add tests for multiple versions of maven and java * Install packages into a project specific directory to prevent cross test pollution * Specify the list of supported Maven versions * Update CHANGELOG and bump the version
Diffstat (limited to 'spec/support')
-rw-r--r--spec/support/integration_test_helper.rb6
-rw-r--r--spec/support/proxy_helper.rb8
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