Skip to content

Commit

Permalink
Ignore 'prn' field on metadata comparing tests
Browse files Browse the repository at this point in the history
The prn field is not RPM metadata, it is pulp specific metadata,
so this can be safely ignored.

Prn was introduced in pulp/pulpcore#5813
  • Loading branch information
pedro-psb committed Oct 7, 2024
1 parent c9d9986 commit 1a04d08
Showing 1 changed file with 8 additions and 4 deletions.
12 changes: 8 additions & 4 deletions pulp_rpm/tests/functional/api/test_sync.py
Original file line number Diff line number Diff line change
Expand Up @@ -944,7 +944,7 @@ def test_core_metadata(init_and_sync, rpm_package_api):
diff = dictdiffer.diff(
package,
RPM_COMPLEX_PACKAGE_DATA,
ignore={"time_file", "pulp_created", "pulp_last_updated", "pulp_href"},
ignore={"time_file", "pulp_created", "pulp_last_updated", "pulp_href", "prn"},
)
assert list(diff) == [], list(diff)

Expand Down Expand Up @@ -1039,16 +1039,20 @@ def module_obsolete_key(m):

for m1, m2 in zip(modules, RPM_MODULEMDS_DATA):
diff = dictdiffer.diff(
m1, m2, ignore={"packages", "pulp_created", "pulp_last_updated", "pulp_href"}
m1, m2, ignore={"packages", "pulp_created", "pulp_last_updated", "pulp_href", "prn"}
)
assert list(diff) == [], list(diff)

for m1, m2 in zip(module_defaults, RPM_MODULEMD_DEFAULTS_DATA):
diff = dictdiffer.diff(m1, m2, ignore={"pulp_created", "pulp_last_updated", "pulp_href"})
diff = dictdiffer.diff(
m1, m2, ignore={"pulp_created", "pulp_last_updated", "pulp_href", "prn"}
)
assert list(diff) == [], list(diff)

for m1, m2 in zip(module_obsoletes, RPM_MODULEMD_OBSOLETES_DATA):
diff = dictdiffer.diff(m1, m2, ignore={"pulp_created", "pulp_last_updated", "pulp_href"})
diff = dictdiffer.diff(
m1, m2, ignore={"pulp_created", "pulp_last_updated", "pulp_href", "prn"}
)
assert list(diff) == [], list(diff)

# assert all package from modular repo is marked as modular
Expand Down

0 comments on commit 1a04d08

Please sign in to comment.