Skip to content

Commit

Permalink
Fix test_scanpipe_deploy_to_develop_pipeline_with_about_file #740
Browse files Browse the repository at this point in the history
Signed-off-by: Thomas Druez <[email protected]>
  • Loading branch information
tdruez committed Jun 12, 2023
1 parent 6729170 commit 419cee5
Show file tree
Hide file tree
Showing 3 changed files with 5 additions and 45 deletions.
44 changes: 3 additions & 41 deletions scanpipe/tests/data/d2d/about_files/expected.json
Original file line number Diff line number Diff line change
Expand Up @@ -295,9 +295,9 @@
"status": "mapped",
"tag": "to",
"extension": ".jar",
"md5": "37bc40b5615567388bdbfa43ba2a5b24",
"sha1": "49b1917cc20a746cb555ae214aafb828c61a2714",
"sha256": "5c718f3fc476fa65cc6827262f0897f2c8e247a1f431ec5c22b5b89897a62dd6",
"md5": "659a690c671a37c498b837df1572bf55",
"sha1": "ca11ec0e5e2b32a84d5e2a1c172913490135da5e",
"sha256": "343fa72824f27352ce855681cd91c0282337e234c6bab58ce4c8510156e83959",
"sha512": "",
"programming_language": "",
"is_binary": true,
Expand Down Expand Up @@ -486,39 +486,6 @@
"urls": [],
"extra_data": {}
},
{
"path": "to/flume-ng-node-1.9.0.jar-extract/META-INF/NOTICE",
"type": "file",
"name": "NOTICE",
"status": "mapped",
"tag": "to",
"extension": "",
"md5": "5aaf03002f53327047c5f87bb9322d20",
"sha1": "6bb508636d5e839671133b3236188e77b2744b47",
"sha256": "559a9d062e2979a9b6ed797ab6fb1034b84cd8b8cdc9dc0e98232c01a703a548",
"sha512": "",
"programming_language": "",
"is_binary": false,
"is_text": true,
"is_archive": false,
"is_media": false,
"is_key_file": false,
"detected_license_expression": "",
"detected_license_expression_spdx": "",
"license_detections": [],
"license_clues": [],
"percentage_of_license_text": null,
"copyrights": [],
"holders": [],
"authors": [],
"package_data": [],
"for_packages": [
"pkg:maven/log4j/[email protected]?uuid=fixed-uid-done-for-testing-5642512d1758"
],
"emails": [],
"urls": [],
"extra_data": {}
},
{
"path": "to/flume-ng-node-1.9.0.jar-extract/META-INF/maven",
"type": "directory",
Expand Down Expand Up @@ -1343,11 +1310,6 @@
"to_resource": "to/flume-ng-node-1.9.0.jar-extract/META-INF/MANIFEST.MF",
"map_type": "about_file"
},
{
"from_resource": "from/flume-ng-node-1.9.0-sources.ABOUT",
"to_resource": "to/flume-ng-node-1.9.0.jar-extract/META-INF/NOTICE",
"map_type": "about_file"
},
{
"from_resource": "from/flume-ng-node-1.9.0-sources.ABOUT",
"to_resource": "to/flume-ng-node-1.9.0.jar-extract/META-INF/maven",
Expand Down
Binary file modified scanpipe/tests/data/d2d/about_files/to-with-jar.zip
Binary file not shown.
6 changes: 2 additions & 4 deletions scanpipe/tests/test_pipelines.py
Original file line number Diff line number Diff line change
Expand Up @@ -876,7 +876,6 @@ def test_scanpipe_deploy_to_develop_pipeline_integration_test(self):
self.assertPipelineResultEqual(expected_file, result_file)

def test_scanpipe_deploy_to_develop_pipeline_with_about_file(self):
self.maxDiff = None
pipeline_name = "deploy_to_develop"
project1 = Project.objects.create(name="Analysis")

Expand All @@ -890,12 +889,11 @@ def test_scanpipe_deploy_to_develop_pipeline_with_about_file(self):
exitcode, out = pipeline.execute()
self.assertEqual(0, exitcode, msg=out)

self.assertEqual(36, project1.codebaseresources.count())
self.assertEqual(31, project1.codebaserelations.count())
self.assertEqual(35, project1.codebaseresources.count())
self.assertEqual(30, project1.codebaserelations.count())
self.assertEqual(1, project1.discoveredpackages.count())
self.assertEqual(0, project1.discovereddependencies.count())

result_file = output.to_json(project1)
print(json.loads(Path(result_file).read_text()))
expected_file = data_dir / "expected.json"
self.assertPipelineResultEqual(expected_file, result_file)

0 comments on commit 419cee5

Please sign in to comment.