Skip to content

Commit

Permalink
fixup! tweak test to sort refs/remove duplicates to make rpm stage co…
Browse files Browse the repository at this point in the history
…mparable without too much noise
  • Loading branch information
mvo5 committed Sep 16, 2024
1 parent 320aa7a commit 4c83c00
Show file tree
Hide file tree
Showing 2 changed files with 6 additions and 9 deletions.
7 changes: 0 additions & 7 deletions example/centos/centos-9-x86_64-ami.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -21,24 +21,17 @@ otk.define:
include:
- coreutils
- dosfstools
- dosfstools
- glibc
- grub2-pc
- grub2-pc
- platform-python
- policycoreutils
- policycoreutils
- python3
- python3-pyyaml
- python3-pyyaml
- rpm
- rpm
- selinux-policy-targeted
- selinux-policy-targeted
- selinux-policy-targeted
- systemd
- xfsprogs
- xfsprogs
- xz
exclude: []
os:
Expand Down
8 changes: 6 additions & 2 deletions test/test_against_images_refs.py
Original file line number Diff line number Diff line change
Expand Up @@ -37,8 +37,12 @@ def fixup_references(manifest):
for pipeline in manifest["pipelines"]:
for stage in pipeline["stages"]:
if stage["type"] == "org.osbuild.rpm":
refs = stage["inputs"]["packages"]["references"]
stage["inputs"]["packages"]["references"] = sorted(refs, key=lambda x: x["id"])
# sort refs/remove duplicates
ids = set(x["id"]
for x in stage["inputs"]["packages"]["references"])
refs = sorted([{"id": i}
for i in ids], key=lambda x: x["id"])
stage["inputs"]["packages"]["references"] = refs


@pytest.mark.parametrize("tc", reference_manifests())
Expand Down

0 comments on commit 4c83c00

Please sign in to comment.