Skip to content

Commit

Permalink
test: ignore UUIDs
Browse files Browse the repository at this point in the history
Temporarily ignore any UUIDs in tests as they are generated in different
order leading to manifest mismatches.

Signed-off-by: Simon de Vlieger <supakeen@redhat.com>
  • Loading branch information
supakeen committed Sep 23, 2024
1 parent ff62fc0 commit b87cba3
Showing 1 changed file with 9 additions and 0 deletions.
9 changes: 9 additions & 0 deletions test/test_against_images_refs.py
Original file line number Diff line number Diff line change
@@ -1,6 +1,7 @@
import json
import os
import pathlib
import re
import yaml

import pytest
Expand Down Expand Up @@ -87,6 +88,10 @@ def test_images_ref(tmp_path, monkeypatch, tc):
ref_manifest = yaml.safe_load(fp)
normalize_rpm_refs(ref_manifest)

# hack
ref_manifest = json.loads(
re.sub(r"[0-9a-f]{8}-[0-9a-f]{4}-[0-9a-f]{4}-[0-9a-f]{4}-[0-9a-f]{12}", "", json.dumps(ref_manifest)))

otk_json = tmp_path / "manifest-otk.json"
run(["compile",
"-o", os.fspath(otk_json),
Expand All @@ -96,4 +101,8 @@ def test_images_ref(tmp_path, monkeypatch, tc):
manifest = json.load(fp)
normalize_rpm_refs(manifest)

# hack
manifest = json.loads(
re.sub(r"[0-9a-f]{8}-[0-9a-f]{4}-[0-9a-f]{4}-[0-9a-f]{4}-[0-9a-f]{12}", "", json.dumps(manifest)))

assert manifest == ref_manifest

0 comments on commit b87cba3

Please sign in to comment.