diff options
| author | mo khan <mo.khan@gmail.com> | 2020-03-04 12:12:48 -0700 |
|---|---|---|
| committer | mo khan <mo.khan@gmail.com> | 2020-03-04 12:12:48 -0700 |
| commit | bcfd6f15f71129a504bab463e84f51e3b3840644 (patch) | |
| tree | 1274e4547e14c8245ece2685deb4f754039aa19f /spec/integration/python/pip_spec.rb | |
| parent | 5957399681c8de847dbc062ca8d8e559fb38eb55 (diff) | |
Convert python qa jobs to integration tests
Diffstat (limited to 'spec/integration/python/pip_spec.rb')
| -rw-r--r-- | spec/integration/python/pip_spec.rb | 19 |
1 files changed, 19 insertions, 0 deletions
diff --git a/spec/integration/python/pip_spec.rb b/spec/integration/python/pip_spec.rb index b092189..0853a71 100644 --- a/spec/integration/python/pip_spec.rb +++ b/spec/integration/python/pip_spec.rb @@ -46,4 +46,23 @@ RSpec.describe "pip" do expect(report[:dependencies]).not_to be_empty end end + + ['2', '3'].each do |python_version| + ['1.0', '1.1', '2.0'].each do |report_version| + context "when generating a `#{report_version}` report using Python `#{python_version}`" do + let(:url) { "https://gitlab.com/gitlab-org/security-products/tests/#{language}-#{package_manager}.git" } + let(:language) { 'python' } + let(:package_manager) { 'pip' } + let(:environment) { { 'LM_REPORT_VERSION' => report_version, 'LM_PYTHON_VERSION' => python_version } } + + it 'matches the expected report' do + runner.clone(url, branch: '48e250a1') + report = runner.scan(env: environment) + #expect(report).to match_schema(version: report_version) + expected = JSON.parse(fixture_file_content("expected/#{language}/#{python_version}/#{package_manager}/v#{report_version}.json")) + expect(report).to eql(expected) + end + end + end + end end |
