Skip to content

Commit 3e65182

Browse files
committed
Find Docker format without "repositories" #32
This adds a test to validate that we do not need the legcacy Docker v1 "repositories" file to be present to recognize a Docker image layout. Signed-off-by: Philippe Ombredanne <[email protected]>
1 parent 8425735 commit 3e65182

File tree

2 files changed

+5
-0
lines changed

2 files changed

+5
-0
lines changed
33.5 KB
Binary file not shown.

tests/test_image.py

Lines changed: 5 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -140,3 +140,8 @@ def test_Image_find_format(self):
140140
test_arch = self.get_test_loc('image/she-image_from_scratch-1.0.tar')
141141
test_dir = self.extract_test_tar(test_arch)
142142
assert Image.find_format(test_dir) == 'docker'
143+
144+
def test_Image_find_format_finds_Docker_images_without_repositories(self):
145+
test_arch = self.get_test_loc('image/mini-image_from_scratch-2.0.tar')
146+
test_dir = self.extract_test_tar(test_arch)
147+
assert Image.find_format(test_dir) == 'docker'

0 commit comments

Comments
 (0)