Skip to content

test(oci): move OCI image USER/WORKDIR checks into a shared tmachine feature suite #4346

Closed

Description

@matthewgrossman

User Story

I need image USER and WORKDIR regression coverage that runs the same way on every container runtime, so a Podman regression is caught as reliably as a Docker one.

Description

Move the OCI image identity and workspace tests out of the legacy Rust e2e test (e2e/rust/tests/custom_image.rs) and into a new oci-image feature suite under tests/suites/features. The suite runs through the installed OpenShell CLI on tmachine, on Docker rootful, Podman rootful, and Podman rootless.

Today these checks only run against Docker, through a wrapper-managed gateway instead of an installed package. They cannot catch a Podman regression, and they do not exercise the packaged CLI and gateway that users install.

The suite expects an unwritable image WORKDIR to fail with WorkspaceValidationFailed on both runtimes. Today Docker and Podman do not report that condition reliably, so this work also makes both drivers report it, with a fixed message.

Context

Definition of Done

  • An oci-image feature suite covers image USER and WORKDIR handling: custom workdirs with named and numeric users, the default managed workspace, rejection of an unwritable workdir, and file transfer into the workspace.
  • Every scenario checks that the workload has no capabilities, has no-new-privileges set, cannot read the sandbox credentials, and that a custom WORKDIR is not a mount. One scenario also inspects the containers the driver created and checks that the workload runs the pinned image ID with no network and no supervisor credential mounts, and that the supervisor is a separate non-root container.
  • Docker and Podman report an unwritable image WORKDIR as WorkspaceValidationFailed, with a fixed message that does not include supervisor output.
  • The suite runs in branch, release-dev, and release-tag CI on Docker rootful (DEB), Podman rootful (RPM), and Podman rootless (RPM) tmachine lanes.
  • ARM64 Docker coverage is preserved.
  • The legacy custom_image Rust e2e test, its Cargo target, and helpers used only by it are removed, and podman_oci_identity keeps only checks the shared suite cannot run.
  • TESTING.md explains how to run the suite.

Metadata

Metadata

Labels

Type

No type

Projects

No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions