Fix a bug in manifest backfill that made it only work on active tags
This commit is contained in:
parent
cb637e1233
commit
0035a1ec6d
3 changed files with 7 additions and 8 deletions
|
|
@ -435,14 +435,15 @@ def clear_rows(initialized_db):
|
|||
])
|
||||
def test_backfill_manifest_for_tag(repo_namespace, repo_name, clear_rows, pre_oci_model):
|
||||
repository_ref = pre_oci_model.lookup_repository(repo_namespace, repo_name)
|
||||
tags = pre_oci_model.list_repository_tags(repository_ref)
|
||||
tags, has_more = pre_oci_model.list_repository_tag_history(repository_ref, size=2500)
|
||||
assert tags
|
||||
assert not has_more
|
||||
|
||||
for tag in tags:
|
||||
assert not tag.manifest_digest
|
||||
assert pre_oci_model.backfill_manifest_for_tag(tag)
|
||||
|
||||
tags = pre_oci_model.list_repository_tags(repository_ref, include_legacy_images=True)
|
||||
tags, _ = pre_oci_model.list_repository_tag_history(repository_ref)
|
||||
assert tags
|
||||
for tag in tags:
|
||||
assert tag.manifest_digest
|
||||
|
|
|
|||
Reference in a new issue