From 7beac643ecadf48814e97349563753234c941200 Mon Sep 17 00:00:00 2001 From: Joseph Schorr Date: Thu, 14 Feb 2019 11:22:06 -0500 Subject: [PATCH] Add an additional test for lookup repo blobs by digest --- data/model/test/test_model_blob.py | 8 ++++++++ 1 file changed, 8 insertions(+) diff --git a/data/model/test/test_model_blob.py b/data/model/test/test_model_blob.py index 7adb2f5bf..343a3c72c 100644 --- a/data/model/test/test_model_blob.py +++ b/data/model/test/test_model_blob.py @@ -39,3 +39,11 @@ def test_get_or_create_shared_blob(initialized_db): again = model.blob.get_or_create_shared_blob('sha256:abcdef', 'somecontent', storage) assert shared == again + + +def test_lookup_repo_storages_by_content_checksum(initialized_db): + for image in database.Image.select(): + found = model.storage.lookup_repo_storages_by_content_checksum(image.repository, + [image.storage.content_checksum]) + assert len(found) == 1 + assert found[0].content_checksum == image.storage.content_checksum