Skip to content

Commit

Permalink
Fix unit test and CI config #367
Browse files Browse the repository at this point in the history
Signed-off-by: Thomas Druez <tdruez@nexb.com>
  • Loading branch information
tdruez committed Dec 3, 2021
1 parent 04bdabc commit 9b0adb6
Show file tree
Hide file tree
Showing 2 changed files with 11 additions and 4 deletions.
3 changes: 3 additions & 0 deletions .github/workflows/ci.yml
Original file line number Diff line number Diff line change
Expand Up @@ -49,6 +49,9 @@ jobs:
- name: Build the documentation
run: make docs

- name: Make kernel files executable (reuired for vmimage extraction)
run: chmod 0644 /boot/vmlinuz-*

- name: Run tests
run: bin/python manage.py test --verbosity=2 --noinput
env:
Expand Down
12 changes: 8 additions & 4 deletions scanpipe/tests/test_pipes.py
Original file line number Diff line number Diff line change
Expand Up @@ -279,11 +279,15 @@ def test_scanpipe_pipes_scancode_extract_archive_vmimage_qcow2(self):
self.assertEqual([], errors)
results = [path.name for path in list(Path(target).glob("**/*"))]
expected = [
"foobar.qcow2-extract/bin/busybox",
"foobar.qcow2-extract/tmp/log",
"bin",
"busybox",
"dot",
"foobar.qcow2",
"log",
"lost+found",
"tmp",
]
for path in expected:
self.assertIn(path, results)
self.assertEqual(sorted(expected), sorted(results))

else:
self.assertEqual(["VM Image extraction only supported on Linux."], errors)
Expand Down

0 comments on commit 9b0adb6

Please sign in to comment.