Skip to content

T2.2 — Make the testinfra suite portable (TEST ADAPTATION) #635

Closed

Description

@c-vigo

Tracking: #625

Context

tests/test_image.py asserts Debian/FHS-specific facts (dpkg packages, hardcoded
/usr/local/bin paths, apt version prefixes, DEBIAN_FRONTEND) that break on a Nix-built
image. This issue makes the suite path-agnostic so it stays valid against both the Debian
and the Nix image — it is the linchpin that lets #634 go green.

Scope

In:

  • Replace host.package("git"/"curl"/"tmux"/"rsync"/"openssh-client"/"nano").is_installed
    (dpkg-only) with host.run("<tool> --version").rc == 0.
  • Replace hardcoded /usr/local/bin/{gh,just,hadolint,taplo}, /root/.cargo/bin,
    /root/.local/bin with which / PATH resolution.
  • Drop or skip DEBIAN_FRONTEND (~line 469) and apt version-prefix checks.
  • Re-validate the /root/assets/workspace/ mount assertions (~lines 521–578).

Out:

Tasks

  • Convert dpkg host.package(...) checks to --version runs
  • Convert hardcoded-path checks to which / PATH resolution
  • Remove/skip DEBIAN_FRONTEND and apt version-prefix assertions
  • Re-validate /root/assets/workspace/ assertions

Acceptance criteria

  • Suite stays green on the Debian image.
  • Suite is valid (path-agnostic) for the Nix image.

Dependencies

Files

  • tests/test_image.py
  • tests/conftest.py

Test notes

Activity

  1. added
    area:image
    area:testing
    on Jun 23, 2026
  2. c-vigo commented on Jul 1, 2026

    @c-vigo
    ContributorAuthor

    Delivered on dev via the Nix-migration epic PR #670 (merged 2026-06-30). tests/test_image.py was made path-agnostic (--version/assert_tool_runs); dpkg//usr/local/bin/DEBIAN_FRONTEND assertions removed. Closing as complete — this stayed open only because the epic merged to dev (not main) and these T/C-track issues carry Tracking: #625 but were never linked as GitHub sub-issues, so sync-issues auto-close never fired (tracked by #677). Refs #625.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Metadata

Metadata

Assignees

No one assigned

    Labels

    area:imagearea:testing

    Type

    No type

    Projects

    No projects

      Milestone

      No milestone

      Relationships

      None yet

      Development

      No branches or pull requests

      Issue actions