Skip to content

test(e2e): extract shared packaging install-test helpers - #236

Merged
indradhanush merged 2 commits into
mainfrom
claude/pict-matrix-rebase-68a6b1
Aug 26, 2026
Merged

test(e2e): extract shared packaging install-test helpers#236
indradhanush merged 2 commits into
mainfrom
claude/pict-matrix-rebase-68a6b1

Conversation

@sebastian-pf9

Copy link
Copy Markdown
Collaborator

avoid code duplication

@codecov

codecov Bot commented Aug 21, 2026

Copy link
Copy Markdown

Codecov Report

✅ All modified and coverable lines are covered by tests.

📢 Thoughts on this report? Let us know!

sebastian-pf9

This comment was marked as resolved.

sebastian-pf9 and others added 2 commits August 21, 2026 16:44
deb_install_test.go and rpm_install_test.go each hand-rolled the same
container-boot-and-wait, byohctl/EnvironmentFile/is-enabled assertions, and
removal-check loop. Any change to that shared lifecycle had to be
hand-copied into both files to stay in sync. Move it into
packaging_helpers_test.go so it exists once.

Deb and rpm stay as separate specs rather than one parameterized test: they
target different OS families (Ubuntu vs Rocky) and package managers, with
genuinely asymmetric steps (deb's architecture-tag and uninstall-log checks,
rpm's stale-build-dir cleanup) — collapsing them further would trade real
differences for a smaller diff.

Co-Authored-By: Claude Sonnet 5 <noreply@anthropic.com>
Move copyFileToContainer/execInContainer into packaging_helpers_test.go
alongside the rest of the shared helpers, instead of leaving them in
rpm_install_test.go despite deb_install_test.go already calling them
cross-file.

Restore the "by dpkg -r"/"by rpm -e" qualifier in assertPathsRemoved's
failure message that got dropped when the removal-check loop was
extracted, so a failure still says what uninstall step should have
removed the path.

Co-Authored-By: Claude Sonnet 5 <noreply@anthropic.com>
@sebastian-pf9
sebastian-pf9 force-pushed the claude/pict-matrix-rebase-68a6b1 branch from 3fa95f6 to 740c890 Compare August 21, 2026 14:45
@indradhanush
indradhanush merged commit 0a91942 into main Aug 26, 2026
18 checks passed
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Projects

None yet

Development

Successfully merging this pull request may close these issues.

2 participants