Skip to content

Commit

Permalink
Merge pull request #33 from nexB/32-docker
Browse files Browse the repository at this point in the history
Remove "repositories" from the Docker clue list #32
  • Loading branch information
pombredanne committed Jun 10, 2021
2 parents 5bd7600 + 3e65182 commit 3c79905
Show file tree
Hide file tree
Showing 4 changed files with 11 additions and 1 deletion.
5 changes: 5 additions & 0 deletions CHANGELOG.rst
Original file line number Diff line number Diff line change
@@ -1,6 +1,11 @@
Changelog
=========

v21.6.10
--------

This is a minor release with bug fixes.

v21.6.4
--------

Expand Down
2 changes: 1 addition & 1 deletion src/container_inspector/image.py
Original file line number Diff line number Diff line change
Expand Up @@ -702,7 +702,7 @@ def find_format(extracted_location):
- oci (which is for the OCI format)
"""
clue_files_by_image_format = {
'docker': ('manifest.json', 'repositories',),
'docker': ('manifest.json',),
'oci': ('blobs', 'index.json', 'oci-layout',)
}

Expand Down
Binary file added tests/data/image/mini-image_from_scratch-2.0.tar
Binary file not shown.
5 changes: 5 additions & 0 deletions tests/test_image.py
Original file line number Diff line number Diff line change
Expand Up @@ -140,3 +140,8 @@ def test_Image_find_format(self):
test_arch = self.get_test_loc('image/she-image_from_scratch-1.0.tar')
test_dir = self.extract_test_tar(test_arch)
assert Image.find_format(test_dir) == 'docker'

def test_Image_find_format_finds_Docker_images_without_repositories(self):
test_arch = self.get_test_loc('image/mini-image_from_scratch-2.0.tar')
test_dir = self.extract_test_tar(test_arch)
assert Image.find_format(test_dir) == 'docker'

0 comments on commit 3c79905

Please sign in to comment.