Repository navigation
test(image): make testinfra suite portable across Debian and Nix images - #645
Merged
c-vigo merged 3 commits intoJun 23, 2026
Merged
Conversation
Replace Debian/FHS-specific assertions in tests/test_image.py with path-agnostic equivalents so the suite is valid against both the current Debian image and the future Nix image: - convert dpkg host.package(...).is_installed checks (git, curl, openssh-client, nano, tmux, rsync) to --version/-V runs - resolve gh, just, hadolint, taplo and cargo-installed tools via PATH (command -v) instead of hardcoded /usr/local/bin, /root/.cargo/bin and /root/.local/bin locations - drop the DEBIAN_FRONTEND env assertion and apt-sourced version-prefix checks (git, curl, tmux, rsync) from EXPECTED_VERSIONS Refs: #635
c-vigo
marked this pull request as ready for review
June 23, 2026 08:18
…' into feature/635-portable-testinfra # Conflicts: # CHANGELOG.md # assets/workspace/.devcontainer/CHANGELOG.md
…' into feature/635-portable-testinfra # Conflicts: # CHANGELOG.md # assets/workspace/.devcontainer/CHANGELOG.md
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.
Summary
Makes
tests/test_image.pypath-agnostic (T2.2) so the testinfra suite stays valid against both the current Debian image and the future Nix image. Pure test refactor — noconftest.pyimage source/name changes.host.package(...).is_installedchecks (git,curl,openssh-client,nano,tmux,rsync) to--version/-Vruns via a smallassert_tool_runshelper.gh,just,hadolint,taploand cargo-installed tools via PATH (command -v, newassert_tool_on_pathhelper) instead of hardcoded/usr/local/bin,/root/.cargo/bin,/root/.local/bin.DEBIAN_FRONTENDenv assertion and the apt-sourced version-prefix checks (git,curl,tmux,rsync) fromEXPECTED_VERSIONS./root/assets/workspace/mount assertions: they use POSIXhost.file(...)checks on image-controlled/root/...paths (not Debian-FHS/dpkg), so they are already portable and left functionally intact.Note: bumped the manually-installed
justversion pin1.53.->1.54.to match the current latest-release binary in the image (the old pin was already failing on a fresh build, independent of this refactor).Verification
wt635(./scripts/build.sh wt635 ...), no:latest/:devclobber, nothing pushed.just test-image wt635: 64 passed in 193.32s (green).just precommit: all hooks pass.is_installed/host.package, no hardcoded/usr/local/binetc., noDEBIAN_FRONTEND, no apt version prefixes) — remaining textual matches are docstrings/comments only.Refs: #635