Add an additional test for lookup repo blobs by digest
This commit is contained in:
parent
ec35750f2c
commit
7beac643ec
1 changed files with 8 additions and 0 deletions
|
@ -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)
|
again = model.blob.get_or_create_shared_blob('sha256:abcdef', 'somecontent', storage)
|
||||||
assert shared == again
|
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
|
||||||
|
|
Reference in a new issue