summaryrefslogtreecommitdiff
path: root/spec/integration/python
diff options
context:
space:
mode:
Diffstat (limited to 'spec/integration/python')
-rw-r--r--spec/integration/python/pip_spec.rb19
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