Add real-world case-based tests #33

Open
opened 2026-04-18 19:17:32 +00:00 by adamwill · 0 comments
Owner

The synthetic tests are OK, but pretty limited and hard to extend to cover more cases. I had an idea that we can just add real-world based tests as well: we can literally just download the real-world metadata for specific interesting results (the base repo metadata, and the metadata from the tested package repo) and use those as test cases.

Of course, they're quite large. So an idea I had is to resurrect the lxml (or pygixml?) based parsing as a standalone script to minify real-world metadata: parse it and rip out bits that don't matter, like the summary, description, packager, url, time, size, location, license, vendor, group, buildhost etc etc. If dnf breaks without some we can replace their values with empty strings at least. It could also allow you to filter out chunks of packages - perhaps by initial letter, so you can just leave out packages that are irrelevant to the scenario. This should allow us to reduce the sizes quite substantially, I hope, so we can keep a few real-world scenarios in the repo without overly bloating it. Possibly we could use a separate repo for this, though.

The synthetic tests are OK, but pretty limited and hard to extend to cover more cases. I had an idea that we can just add real-world based tests as well: we can literally just download the real-world metadata for specific interesting results (the base repo metadata, and the metadata from the tested package repo) and use those as test cases. Of course, they're quite large. So an idea I had is to resurrect the lxml (or pygixml?) based parsing as a standalone script to minify real-world metadata: parse it and rip out bits that don't matter, like the summary, description, packager, url, time, size, location, license, vendor, group, buildhost etc etc. If dnf breaks without some we can replace their values with empty strings at least. It could also allow you to filter out chunks of packages - perhaps by initial letter, so you can just leave out packages that are irrelevant to the scenario. This should allow us to reduce the sizes quite substantially, I hope, so we can keep a few real-world scenarios in the repo without overly bloating it. Possibly we could use a separate repo for this, though.
adamwill added this to the Sprint 8 project 2026-04-21 05:59:04 +00:00
adamwill removed this from the Sprint 8 project 2026-05-05 15:23:27 +00:00
Sign in to join this conversation.
No milestone
No project
No assignees
1 participant
Notifications
Due date
The due date is invalid or out of range. Please use the format "yyyy-mm-dd".

No due date set.

Dependencies

No dependencies set.

Reference
quality/rmdepcheck#33
No description provided.