summaryrefslogtreecommitdiff
path: root/spec/integration/js/npm_spec.rb
diff options
context:
space:
mode:
authorCan Eldem <celdem@gitlab.com>2020-07-23 11:01:47 +0000
committerCan Eldem <celdem@gitlab.com>2020-07-23 11:01:47 +0000
commit8ee0824204c0e97d97ad6d38778cd9e7e9da6813 (patch)
treed851d65d729ecdffd018c79c6f5d887a1e506bce /spec/integration/js/npm_spec.rb
parentca675527b53c2a8316c962ee1a17bc1ee1c0c156 (diff)
parentdfa59682cfe6cc3726c321236b1e0db5e965e722 (diff)
Merge branch 'offline-tests' into 'master'v3.19.2
Combine default/custom x509 certificates in TLS validation See merge request gitlab-org/security-products/license-management!194
Diffstat (limited to 'spec/integration/js/npm_spec.rb')
-rw-r--r--spec/integration/js/npm_spec.rb9
1 files changed, 7 insertions, 2 deletions
diff --git a/spec/integration/js/npm_spec.rb b/spec/integration/js/npm_spec.rb
index 0efc97a..a8dd2d4 100644
--- a/spec/integration/js/npm_spec.rb
+++ b/spec/integration/js/npm_spec.rb
@@ -467,10 +467,15 @@ RSpec.describe "npm" do
end
end
- context "when scanning a project with dependencies sourced from a custom registry", environment: 'offline' do
- subject { runner.scan(env: { 'ADDITIONAL_CA_CERT_BUNDLE' => fixture_file_content('js/custom-npm.crt') }) }
+ context "when scanning a project with dependencies sourced from a custom registry" do
+ subject { runner.scan(env: { 'ADDITIONAL_CA_CERT_BUNDLE' => x509_certificate('wildcard.test').read }) }
+
+ let(:private_npm_host) { 'npm.test' }
before do
+ add_host('npm.test', '127.0.0.1')
+ start_proxy_server
+
runner.add_file(".npmrc", "registry = https://#{private_npm_host}")
runner.add_file("package.json") do
JSON.pretty_generate({