diff --git a/workers/test/test_tagbackfillworker.py b/workers/test/test_tagbackfillworker.py index 6ee046b28..430cba3a8 100644 --- a/workers/test/test_tagbackfillworker.py +++ b/workers/test/test_tagbackfillworker.py @@ -111,6 +111,21 @@ def test_tagbackfillworker(clear_all_rows, initialized_db): assert len(tags) == len(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