summaryrefslogtreecommitdiffstats
path: root/tests/docker_source.py
diff options
context:
space:
mode:
authorRadostin Stoyanov <rstoyanov1@gmail.com>2017-08-26 21:41:55 +0100
committerRadostin Stoyanov <rstoyanov1@gmail.com>2017-08-28 15:58:39 +0100
commit376dd96934de59d72db5fde376533bcba2bdc670 (patch)
tree3a4d269119ef2efab4aa0edcad4f0aef8ae78204 /tests/docker_source.py
parente9826e1a29dd045a1a6c680d0d709906da13488b (diff)
downloadvirt-bootstrap.git-376dd96934de59d72db5fde376533bcba2bdc670.tar.gz
virt-bootstrap.git-376dd96934de59d72db5fde376533bcba2bdc670.tar.xz
virt-bootstrap.git-376dd96934de59d72db5fde376533bcba2bdc670.zip
DockerSource: Split checksum and layers
The current implementation store in one list: - checksum - checksum type - file path - file size However, the information about checksum and checksum type is only used to verify the content of tarball before it is being extracted. Splitting these into separate lists would allow us to reuse the function untar_layers() with FileSource.
Diffstat (limited to 'tests/docker_source.py')
-rw-r--r--tests/docker_source.py12
1 files changed, 6 insertions, 6 deletions
diff --git a/tests/docker_source.py b/tests/docker_source.py
index 5f9e6fe..9dc25d9 100644
--- a/tests/docker_source.py
+++ b/tests/docker_source.py
@@ -333,9 +333,9 @@ class TestDockerSource(unittest.TestCase):
}
expected_result = [
- ['sha256', 'a7050fc1', '/images_path/a7050fc1.tar', None],
- ['sha256', 'c6ff40b6', '/images_path/c6ff40b6.tar', None],
- ['sha256', '75c416ea', '/images_path/75c416ea.tar', None]
+ ['/images_path/a7050fc1.tar', None],
+ ['/images_path/c6ff40b6.tar', None],
+ ['/images_path/75c416ea.tar', None]
]
with mock.patch('os.path.getsize') as m_getsize:
@@ -364,9 +364,9 @@ class TestDockerSource(unittest.TestCase):
}
expected_result = [
- ['sha256', '75c416ea', '/images_path/75c416ea.tar', 47103294],
- ['sha256', 'c6ff40b6', '/images_path/c6ff40b6.tar', 814],
- ['sha256', 'a7050fc1', '/images_path/a7050fc1.tar', 513]
+ ['/images_path/75c416ea.tar', 47103294],
+ ['/images_path/c6ff40b6.tar', 814],
+ ['/images_path/a7050fc1.tar', 513]
]
src_instance = self._mock_retrieve_layers_info(manifest, kwargs)[0]