Skip to content

test(e2e): port Docker and Podman driver feature tests from e2e/rust - #5695

Draft
matthewgrossman wants to merge 10 commits into
test/5655-port-network-l7-policy/matthewgrossmanfrom
test/5676-port-docker-podman-features/matthewgrossman
Draft

matthewgrossman wants to merge 10 commits into
test/5655-port-network-l7-policy/matthewgrossmanfrom
test/5676-port-docker-podman-features/matthewgrossman

Conversation

@matthewgrossman

Copy link
Copy Markdown
Member

Summary

Ports the e2e/rust tests that need a container engine to testkit suites, so they run on the Docker and Podman rows instead of being gated to one engine. Draft: transparent TCP is not ported yet, and some legacy files stay until the drops in #5297 are decided.

Related Issue

Closes #5676
Part of #5281

Stacked on #5665 (base test/5655-port-network-l7-policy/matthewgrossman), which is stacked on #5691 and #5442. In-sandbox clients use only #5691's shared API (sandbox_clients_support, TEST_HOST, Sandbox::run_python). This branch merges #5691, so the diff shows its changes until #5665 merges it too.

Changes

  • tests/suites/drivers/{docker,podman}: stop is terminal and ephemeral cleanup leaves no containers, one test per driver. Podman also checks the supervisor JWT exp. drivers/docker is a new suite with its CI rows.
  • features/resource-limits: checks that gateway info reports CPU and memory limit_supported, then reads cpu.max and memory.max.
  • features/ocsf: supervisor stderr OCSF JSON records. Covers opt-in, clean stdout, gateway logs keeping only the shorthand, Network/HTTP/SSH Activity classes (denied connect, L7-denied POST to an in-process host server, exec sessions), container and image attribution, version, and OCSF schema validation.
  • features/driver-config: existing volume, OCI workspace with a nested volume, and bind mount, on a new <base>-driver-config tmachine environment.
  • features/host-gateway: response_eof.rs runs the three closing responses in one sandbox and checks the read ends with ReadEnd::Closed. host_server_reachable_after_stop_start checks the host server again after stop and start.
  • Helpers: container-engine state, copy, log and volume helpers; testkit Context::gateway_info.
  • Removes driver_config_volume.rs, ocsf_console.rs and podman_resource_limits.rs, and the EOF test from host_gateway_alias.rs, plus the now-unused bollard dependency. local_driver_token_restart.rs stays for now (see below).

Defaults applied

  • The driver-config environment sets allow_driver_config = true and enable_bind_mounts = true, and disables resource admission, which blocks bind mounts. Test volumes still carry the openshell.ai/sandbox-attachable and workspace labels.
  • The bind-mount test uses testkit::python_image(), because the default image has no sandbox user. The bind source is a temp directory under $HOME.
  • features/resource-limits has no k3s row yet. The VM driver reports limit_supported=false, so no VM issue was filed.
  • No container fixture is kept so far. The transparent-TCP port may need one on Podman (see below).

Coverage that is new on a driver

  • Resource limits on Docker.
  • OCSF stderr records on Podman.
  • OCI workspace with a nested volume on Podman.
  • Driver lifecycle (stop is terminal, ephemeral cleanup) on Docker.
  • HTTP response EOF and stop/start reachability on Docker, Podman rootless, and k3s/k3s-ha. They were Podman-only or Docker-only before.

Still to do

  • features/transparent-tcp: local_container_native_tcp_uses_policy_dns_and_fails_closed and rootless_podman_private_dns_pins_do_not_cross_binary_rules. These need shared clients that report getaddrinfo results and run a probe under a copied interpreter. They also need a decision on keeping a Podman fixture on the gateway network.
  • local_driver_token_restart.rs: delete now, or keep its VM part until PR6.

Pending drops (Decision D in #5297)

These stay in e2e/rust until approved:

  • ocsf_jsonl_conformance.rs, for its /var/log file-sink check. Its other checks now live in features/ocsf.
  • host_gateway_alias::sandbox_reaches_host_openshell_internal_via_host_gateway_alias.
  • podman_host_gateway.rs, for its reachability half and the nameserver 127.0.0.53 check. Its stop/start half now lives in features/host-gateway.
  • transparent_tcp::rootless_podman_musl_getaddrinfo_uses_udp_policy_dns.

Testing

  • cargo fmt --check on testkit, support, drivers/docker, drivers/podman, features, conformance and e2e/rust.

  • cargo clippy --locked --all-targets -- -D warnings on the same workspaces.

  • Unit tests in tests/support and the features/ocsf record parser.

  • uv run tasks/scripts/check_cargo_lockfile_alignment.py.

  • Not run end to end locally: on macOS the supervisor can't reach a gateway bound to 127.0.0.1. These rely on the CI tmachine rows.

  • Podman rows may flake on ContainerExited until fix(server): skip the reconcile poll of a sandbox whose start is in progress #5265 merges.

  • Checks appropriate to the affected code and behavior pass

  • Unit tests added/updated (if applicable)

  • E2E tests added/updated (if applicable)

Checklist

  • Follows Conventional Commits
  • Commits are signed off (DCO)
  • Architecture docs updated (if applicable)

…container-engine

Signed-off-by: Matthew Grossman <mgrossman@nvidia.com>
…leanup

Signed-off-by: Matthew Grossman <mgrossman@nvidia.com>
… and ephemeral cleanup

Signed-off-by: Matthew Grossman <mgrossman@nvidia.com>
Signed-off-by: Matthew Grossman <mgrossman@nvidia.com>
…ker and Podman

Signed-off-by: Matthew Grossman <mgrossman@nvidia.com>
Signed-off-by: Matthew Grossman <mgrossman@nvidia.com>
…onfig on Docker and Podman

Signed-off-by: Matthew Grossman <mgrossman@nvidia.com>
…matthewgrossman' into test/5676-port-docker-podman-features/matthewgrossman

Signed-off-by: Matthew Grossman <mgrossman@nvidia.com>

# Conflicts:
#	tests/testkit/README.md
#	tests/testkit/testkit/src/policy.rs
… host-gateway

The EOF check runs its three responses in one sandbox and reads the close through the shared http_raw client. The stop/start check is the restart half of podman_host_gateway, which stays in e2e/rust until its DNS relay check is decided.

Signed-off-by: Matthew Grossman <mgrossman@nvidia.com>
…ocsf

Merges the class, attribution and schema checks of ocsf_jsonl_conformance into the stderr test. The sandbox denies a TCP connect and an L7 POST to an in-process host server, and the exec sessions add SSH Activity. ocsf_jsonl_conformance stays in e2e/rust for its /var/log file-sink check until that drop is decided.

Signed-off-by: Matthew Grossman <mgrossman@nvidia.com>
@copy-pr-bot

copy-pr-bot Bot commented Nov 18, 2026

Copy link
Copy Markdown

Auto-sync is disabled for draft pull requests in this repository. Workflows must be run manually.

Contributors can view more details about this message here.

@github-actions github-actions Bot added the state:accepted A maintainer decided OpenShell should pursue this issue label Nov 18, 2026

This branch has not been deployed

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

Labels

state:accepted A maintainer decided OpenShell should pursue this issue

Projects

None yet

Development

Successfully merging this pull request may close these issues.

1 participant