diff options
| author | Can Eldem <celdem@gitlab.com> | 2020-07-23 11:01:47 +0000 |
|---|---|---|
| committer | Can Eldem <celdem@gitlab.com> | 2020-07-23 11:01:47 +0000 |
| commit | 8ee0824204c0e97d97ad6d38778cd9e7e9da6813 (patch) | |
| tree | d851d65d729ecdffd018c79c6f5d887a1e506bce /spec/integration/js/bower_spec.rb | |
| parent | ca675527b53c2a8316c962ee1a17bc1ee1c0c156 (diff) | |
| parent | dfa59682cfe6cc3726c321236b1e0db5e965e722 (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/bower_spec.rb')
| -rw-r--r-- | spec/integration/js/bower_spec.rb | 14 |
1 files changed, 10 insertions, 4 deletions
diff --git a/spec/integration/js/bower_spec.rb b/spec/integration/js/bower_spec.rb index 6d51394..227718e 100644 --- a/spec/integration/js/bower_spec.rb +++ b/spec/integration/js/bower_spec.rb @@ -11,7 +11,7 @@ RSpec.describe "bower" do end specify { expect(subject).to match_schema } - specify { expect(subject.dependency_names).to match_array(['cli', 'ev-emitter', 'example-project', 'fizzy-ui-utils', 'get-size', 'jquery', 'masonry-layout', 'matches-selector', 'outlayer', 'stimulus.umd']) } + specify { expect(subject.dependency_names).to match_array(['debug', 'cli', 'ev-emitter', 'example-project', 'fizzy-ui-utils', 'get-size', 'jquery', 'masonry-layout', 'matches-selector', 'outlayer', 'stimulus.umd']) } specify { expect(subject.licenses_for('cli')).to match_array(['Apache-2.0', 'BSD-2-Clause', 'BSD-3-Clause', 'ISC', 'MIT']) } specify { expect(subject.licenses_for('ev-emitter')).to match_array(['MIT']) } specify { expect(subject.licenses_for('example-project')).to match_array(['ISC']) } @@ -24,10 +24,15 @@ RSpec.describe "bower" do specify { expect(subject.licenses_for('stimulus.umd')).to match_array(['unknown']) } end - context "when scanning a bower project with a dependency from a custom npm registry", environment: 'offline' do - subject { runner.scan(env: { 'ADDITIONAL_CA_CERT_BUNDLE' => fixture_file_content('js/custom-npm.crt') }) } + context "when scanning a bower project with a dependency from a custom npm 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(private_npm_host, '127.0.0.1') + start_proxy_server + runner.add_file(".npmrc", "registry = https://#{private_npm_host}") runner.add_file(".bowerrc") do JSON.pretty_generate({ resolvers: ['bower-npm-resolver'] }) @@ -42,7 +47,8 @@ RSpec.describe "bower" do end specify { expect(subject).to match_schema } - specify { expect(subject.dependency_names).to match_array(%w[js-bower lodash]) } + specify { expect(subject.dependency_names).to match_array(%w[debug js-bower lodash]) } + specify { expect(subject.licenses_for('debug')).to match_array(['unknown']) } specify { expect(subject.licenses_for('js-bower')).to match_array(['ISC']) } specify { expect(subject.licenses_for('lodash')).to match_array(['MIT']) } end |
