Skip to content

Commit 695eef0

Browse files
committed
Add docker pipeline test for rpm images #411
Signed-off-by: Jono Yang <jyang@nexb.com>
1 parent 27872f3 commit 695eef0

File tree

2 files changed

+24
-0
lines changed

2 files changed

+24
-0
lines changed
17.3 MB
Binary file not shown.

scanpipe/tests/test_pipelines.py

Lines changed: 24 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -340,3 +340,27 @@ def test_scanpipe_docker_pipeline_alpine_integration_test(self):
340340
result_file = output.to_json(project1)
341341
expected_file = self.data_location / "alpine_3_15_4_scan_codebase.json"
342342
self.assertPipelineResultEqual(expected_file, result_file, regen=False)
343+
344+
def test_scanpipe_docker_pipeline_rpm_integration_test(self):
345+
pipeline_name = "docker"
346+
project1 = Project.objects.create(name="Analysis")
347+
348+
filename = "redhat_ubi8.tar"
349+
input_location = self.data_location / filename
350+
project1.copy_input_from(input_location)
351+
project1.add_input_source(filename, "https://download.url", save=True)
352+
353+
run = project1.add_pipeline(pipeline_name)
354+
pipeline = run.make_pipeline_instance()
355+
356+
exitcode, _ = pipeline.execute()
357+
self.assertEqual(0, exitcode)
358+
359+
# TODO: add correct number of resources and packages when we get the
360+
# pipeline working
361+
self.assertEqual(6, project1.codebaseresources.count())
362+
self.assertEqual(1, project1.discoveredpackages.count())
363+
364+
result_file = output.to_json(project1)
365+
expected_file = self.data_location / "redhat_ubi8_scan_codebase.json"
366+
self.assertPipelineResultEqual(expected_file, result_file, regen=False)

0 commit comments

Comments
 (0)