Skip to content

test: Fix IncrementalSkipDuplicates using wrong repodata path - #6

Merged
bsherman merged 2 commits into
mainfrom
fix-integration-test
Mar 19, 2026
Merged

bsherman merged 2 commits into
mainfrom
fix-integration-test

Conversation

@bsherman

@bsherman bsherman commented Mar 19, 2026 •

Copy link
Copy Markdown

Two bugs in TestIntegration/IncrementalSkipDuplicates:

  1. verifyRPMPackageCount hardcoded repoDir/repodata as the repodata path, but RPM repos use a nested layout (<version>/<arch>/repodata/). Fixed by using the existing findRepodataDir helper, consistent with how ChecksumVerification/RPM already works.

  2. findPrimaryXML scanned the repodata directory for any filename containing primary.xml.gz. A yum/dnf repo may have multiple such files present simultaneously (they are content-addressed; retaining older ones is valid), so this could return a stale file from a previous incremental run. Fixed by parsing repomd.xml and following its authoritative href, which is what the generator and real package managers do.

RPM repos use a versioned/arch nested layout (e.g. `40/x86_64/repodata/`),
so hardcoding `repoDir/repodata` in verifyRPMPackageCount never finds the
directory. Use the existing findRepodataDir helper instead, which is how
the ChecksumVerification/RPM test already does it.

Assisted-by: OpenCode (claude-sonnet-4.6)
@bsherman
bsherman force-pushed the fix-integration-test branch from f4ab924 to a2797e2 Compare March 19, 2026 18:40
Two bugs caused this test to fail:

1. verifyRPMPackageCount hardcoded `repoDir/repodata` but RPM repos use a
   nested versioned/arch layout (e.g. `40/x86_64/repodata/`). Fix: use the
   existing findRepodataDir helper, consistent with ChecksumVerification/RPM.

2. findPrimaryXML scanned the repodata directory for any file matching
   "primary.xml.gz", but a repo may legitimately have multiple such files
   (content-addressed, older ones are valid to retain). On a multi-step
   incremental run this returned the stale single-package file instead of
   the current two-package one. Fix: parse repomd.xml and follow its
   authoritative href, as the generator and real package managers do.

Assisted-by: OpenCode (claude-sonnet-4.6)
@bsherman
bsherman force-pushed the fix-integration-test branch from a2797e2 to 875e01c Compare March 19, 2026 18:47
@bsherman
bsherman requested review from KyleGospo and bketelsen March 19, 2026 18:51
@bsherman
bsherman merged commit a202ecc into main Mar 19, 2026
1 check passed
@bsherman
bsherman deleted the fix-integration-test branch March 19, 2026 19:07
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

1 participant