Add an additional validation test to the tag backfill worker tests
This commit is contained in:
parent
171e2ec39b
commit
74bc161b2e
1 changed files with 15 additions and 0 deletions
|
@ -111,6 +111,21 @@ def test_tagbackfillworker(clear_all_rows, initialized_db):
|
||||||
assert len(tags) == len(oci_tags)
|
assert len(tags) == len(oci_tags)
|
||||||
assert {t.name for t in tags} == {t.name for t in oci_tags}
|
assert {t.name for t in tags} == {t.name for t in oci_tags}
|
||||||
|
|
||||||
|
for tag in tags:
|
||||||
|
tag_manifest = TagManifest.get(tag=tag)
|
||||||
|
ttr = TagToRepositoryTag.get(repository_tag=tag)
|
||||||
|
manifest = ttr.tag.manifest
|
||||||
|
|
||||||
|
assert tag_manifest.json_data == manifest.manifest_bytes
|
||||||
|
assert tag_manifest.digest == manifest.digest
|
||||||
|
assert tag.image == ManifestLegacyImage.get(manifest=manifest).image
|
||||||
|
assert tag.lifetime_start_ts == (ttr.tag.lifetime_start_ms / 1000)
|
||||||
|
|
||||||
|
if tag.lifetime_end_ts:
|
||||||
|
assert tag.lifetime_end_ts == (ttr.tag.lifetime_end_ms / 1000)
|
||||||
|
else:
|
||||||
|
assert ttr.tag.lifetime_end_ms is None
|
||||||
|
|
||||||
assert found_dead_tag
|
assert found_dead_tag
|
||||||
|
|
||||||
|
|
||||||
|
|
Reference in a new issue