[quality] test: unit coverage for files/os/sysupdate.d transfers (60-uki, 70-k0s) + release-artifact name contract - #52
Closed
kubestellar-hive[bot] wants to merge 1 commit into
Closed
kubestellar-hive[bot] wants to merge 1 commit into
kubestellar-hive[bot] wants to merge 1 commit into
Conversation
Adds tests/unit/test_sysupdate_transfers.py: 23 cases covering 60-uki.transfer and 70-k0s.transfer, which had zero coverage, plus the source-side artifact-name contract for all three transfers. Co-authored-by: Copilot <223556219+Copilot@users.noreply.github.com> Signed-off-by: sec-check[bot] <sec-check[bot]@users.noreply.github.com>
Collaborator
|
Merged into main via #59. Thanks! |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
Test Improvement
New file:
tests/unit/test_sysupdate_transfers.py(23 cases). No production files touched.Claimed ground (exact)
files/os/sysupdate.d/60-uki.transfer,files/os/sysupdate.d/70-k0s.transfer,files/os/sysupdate.d/50-root.transfer(source-side only),files/k0s/sysext/extension-release.k0selements/**/*.bsttests/unit/test_sysupdate_transfers.pyGap this closes
tests/unit/test_repart_layout.pypins only the target side of50-root.transferagainst the installer repart config.60-uki.transferand70-k0s.transferhad zero coverage, and no test pinned the sourceMatchPatternof any transfer to an artifact the build actually emits. Renaming a release asset inelements/oci/*.bstbreaks OTA silently: systemd-sysupdate finds no candidate and reports the system up to date forever.What is asserted
[Transfer]/[Source]/[Target]; filenames areNN-lowercase.transferwith unique ordering prefixes[Source]isType=url-filepointing at this repo's own https release feed (origin-drift guard)MatchPatterncorresponds to an artifact some element emits:bluefin-server-ddi-<v>.raw.zst,bluefin-server-<v>.efi,k0s-<v>.raw.zstType=file,Path=/efi/EFI/Linux,.efiextension preserved, source/target names agreeType=regular-file,Path=/var/lib/extensions,Mode=0644, stableCurrentSymlink=k0s.raw, and target is the decompressed form of the downloaded.zstextension-release.k0sfilename andNAME=match the merged image namek0s, andID=_any(a mismatch makes systemd-sysext reject the merge at boot)Verification
python3 -m pytest tests/unit -q→ 100 passed, 1 xfailed (23 new)CurrentSymlinkand the k0s asset pattern fails 4 of the new tests, then passes again on revertDisjointness
Only other open PR on this repo is #27 (
elements/installer/installer-stack.bst,elements/oci/bluefin-server-installer.bst,docs/skills/ddi-installer.md) — no overlap withfiles/os/sysupdate.d/,files/k0s/sysext/, ortests/. The element artifact-name lookup here scanselements/**generically rather than pinningbluefin-server-installer.bstline numbers, so #27 cannot conflict.Filed by quality agent (hold-gated mode). Human review required — do not merge, do not remove
hold.— hive: agent=quality backend=copilot model=claude-opus-5