Skip to content

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

Merged
matthewgrossman merged 23 commits into
mainfrom
test/5676-port-docker-podman-features/matthewgrossman
Dec 2, 2026
Merged

matthewgrossman merged 23 commits into
mainfrom
test/5676-port-docker-podman-features/matthewgrossman

Conversation

@matthewgrossman

@matthewgrossman matthewgrossman commented Nov 18, 2026 •

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.

Related Issue

Closes #5676
Part of #5281

Based on main. #5665 and #5691 have merged.

Helpers from #5691 (now on main) used: sandbox_clients_support::{connect, http, http_raw} with Request, ReadEnd::Closed and Http::status(); host_server_support::{TEST_HOST, HttpRecorder, TcpServer}; testkit::python_image() with .command(["sleep", "infinity"]); policy::allow and policy::base_with with policy::binaries_yaml(PYTHON_BINARIES). Left inline: the driver-config main commands, which must run as the main process (the OCI test checks workspace preparation before exec sleep infinity), and the bind test's filesystem-only policy YAML, which has no binaries: list.

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.
  • features/transparent-tcp: native TCP resolves through policy DNS to a synthetic address and reaches an echo fixture, also by the numeric synthetic address after its mapping expires, as an IPv4-mapped IPv6 address, and on the endpoint's second port. A wrong port, the fixture's real address, and an unlisted host are denied, nothing denied reaches the fixture, and exec still works afterwards. Rows: Docker rootful, Podman rootful and rootless. On both engines the fixture runs on the host behind host.openshell.internal. A fixture container on the Podman network can't be used: since RFC 0012 (feat(isolation): implement the RFC 0012 sandbox architecture #2942) the Podman supervisor shares the host's network namespace, so policy DNS asks the host's resolver, which doesn't know the network's aliases. The legacy Podman variant (fixture container, TCP port 53, transparent listener port 15001) never ran in CI, because transparent_tcp was excluded from the tmachine archive.
  • Helpers: container-engine state, copy, log and volume helpers; testkit Context::gateway_info and SandboxBuilder::log_level. Engine::copy_from reads cp <id>:<path> - as a tar stream, because under rootful Podman (sudo -n podman cp) a copy to a host path is owned by root and the test can't read it.
  • Each test target is a harnessless testkit program (test(testkit): support per-environment skips in all suites #5789). The driver lifecycle targets are docker-lifecycle and podman-lifecycle, and the OCSF record parser lives in a small library so its unit tests still run.
  • features/ocsf sets the sandbox log level to info. The shorthand layer logs at info; the Podman driver leaves the supervisor at its warn default, while the Docker driver passes the gateway's level, so without it Podman's supervisor stderr has no OCSF NET:OPEN line.
  • New shared clients and fixtures:
    • sandbox_clients_support::resolve returns what getaddrinfo answered (Resolve::{Addresses, Failed}).
    • sandbox_clients_support::Python runs connect, http, http_raw and resolve under a chosen interpreter with extra environment, such as a copied python3 with PYTHONHOME. The free functions use the image's python3.
  • Removes driver_config_volume.rs, ocsf_console.rs, podman_resource_limits.rs, ocsf_jsonl_conformance.rs, host_gateway_alias.rs, podman_host_gateway.rs and transparent_tcp.rs, plus the now-unused bollard and openshell-ocsf-validate dependencies, and their entries in the Podman and VM wrapper lanes. local_driver_token_restart.rs keeps only its VM gateway restart test until PR6, and leaves the Podman CI list.

Defaults applied

  • The driver-config environment sets allow_driver_config = true and enable_bind_mounts = true, and disables resource admission, through a driver-config block written by the gateway_overrides role. Only this environment disables it: admission rejects host bind mounts, so the bind-mount test can't run with it on. 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.

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.
  • Native TCP policy DNS runs in the tmachine CI rows; before, transparent_tcp was excluded from the tmachine archive.

Dropped checks (Decision D in #5297)

These checks are dropped, not ported, as approved in #5297:

  • From ocsf_jsonl_conformance.rs: the /var/log file-sink check.
  • From host_gateway_alias.rs: sandbox_reaches_host_openshell_internal_via_host_gateway_alias.
  • From podman_host_gateway.rs: host gateway reachability and the nameserver 127.0.0.53 check.
  • From transparent_tcp.rs: rootless_podman_musl_getaddrinfo_uses_udp_policy_dns, and rootless_podman_private_dns_pins_do_not_cross_binary_rules. The second needs a fixture at a private address reached by a *.openshell.test name, which neither engine's environment can provide, and it never ran in CI. test(network): cover DNS pins not crossing binary rules with a crate test #5916 tracks a crate-level test for it.

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 (including the new Python command and resolve parser) and the features/ocsf record parser.

  • uv run tasks/scripts/check_cargo_lockfile_alignment.py and tasks/scripts/check-cargo-lockfiles.sh. Every commit resolves with cargo metadata --locked.

  • Run end to end locally against Docker Desktop with e2e/with-docker-gateway.sh: features/host-gateway (3 tests), features/ocsf, features/resource-limits, features/transparent-tcp and drivers/docker pass. features/driver-config and the Podman rows rely on CI.

  • Podman rows may flake on ContainerExited until fix(server): keep the reconcile sweep from failing a sandbox mid-start #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)

@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
@matthewgrossman
matthewgrossman force-pushed the test/5655-port-network-l7-policy/matthewgrossman branch from 251835b to 3214f39 Compare November 18, 2026 18:34
@matthewgrossman
matthewgrossman force-pushed the test/5676-port-docker-podman-features/matthewgrossman branch from 4c8dfc9 to 4579361 Compare November 18, 2026 18:42
@matthewgrossman

Copy link
Copy Markdown
Member Author

/ok to test 4579361

@matthewgrossman
matthewgrossman force-pushed the test/5676-port-docker-podman-features/matthewgrossman branch from 4579361 to cd9c8f2 Compare November 18, 2026 18:51
@matthewgrossman

Copy link
Copy Markdown
Member Author

/ok to test cd9c8f2

@matthewgrossman
matthewgrossman force-pushed the test/5655-port-network-l7-policy/matthewgrossman branch from 3214f39 to f99bacb Compare November 18, 2026 19:08
@matthewgrossman

Copy link
Copy Markdown
Member Author

/ok to test 0a29574

@matthewgrossman
matthewgrossman force-pushed the test/5676-port-docker-podman-features/matthewgrossman branch from cd9c8f2 to 0a29574 Compare November 18, 2026 19:11
@matthewgrossman
matthewgrossman force-pushed the test/5655-port-network-l7-policy/matthewgrossman branch from f99bacb to afcf2f4 Compare November 18, 2026 23:27
@matthewgrossman

Copy link
Copy Markdown
Member Author

/ok to test f188601

@matthewgrossman

Copy link
Copy Markdown
Member Author

/ok to test f054e20

@matthewgrossman
matthewgrossman force-pushed the test/5655-port-network-l7-policy/matthewgrossman branch from bfcbcc7 to 86a2569 Compare November 19, 2026 19:38
@matthewgrossman

Copy link
Copy Markdown
Member Author

/ok to test 0211cf1

@matthewgrossman
matthewgrossman force-pushed the test/5676-port-docker-podman-features/matthewgrossman branch from f054e20 to 0211cf1 Compare November 20, 2026 00:34
@matthewgrossman

Copy link
Copy Markdown
Member Author

/ok to test 1d05357

@matthewgrossman
matthewgrossman force-pushed the test/5676-port-docker-podman-features/matthewgrossman branch from 1facc5e to c3d15d9 Compare November 24, 2026 23:07
…wgrossman

Take main's features workspace manifest, which finds members itself (#6089).
Refresh the e2e/rust, features and drivers/docker lockfiles.

Signed-off-by: Matthew Grossman <mgrossman@nvidia.com>
@matthewgrossman
matthewgrossman marked this pull request as ready for review November 30, 2026 22:17
@matthewgrossman
matthewgrossman requested a review from a team as a code owner November 30, 2026 22:17

@TaylorMutch TaylorMutch left a comment

Copy link
Copy Markdown
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

gator-agent

PR Review Status

Completed the initial code-only review of the Docker and Podman test migration, including suite wiring, shared helpers, and the legacy coverage being replaced. No blocking findings remain. Required checks, including the selected E2E suite, are green; maintainer approval is the remaining action.

Blocking findings: None.
Carried findings: None.
Non-blocking suggestions: None.

Gator metadata
  • Validation: Focused testkit migration linked to #5676 and #5281; author has repository write access.
  • Docs: Published Fern updates are unnecessary for this test-only migration; CI.md, TESTING.md and testkit documentation are updated.
  • Checks: DCO, Branch Checks, Helm Lint and E2E are successful on the current head.
  • E2E: Existing test:e2e selected suite completed successfully. No tests or workflows were started by this review.
  • Head SHA: 49b0c8d0a0fe0459afbb4f1506b4e75414b078f8
  • Base SHA: 967c594c311007bc74969666502efa348a0ff41d
  • Merge base SHA: 967c594c311007bc74969666502efa348a0ff41d
  • Patch ID: 82c1b8bafb07565d40a05614f6e864359edf8ee0
  • Gator payload: 16
  • Review mode: initial
  • Previous reviewed SHA: none
  • Review budget exhausted: no
  • Maintainer decision required: no
  • Next state: gator:approval-needed

@TaylorMutch TaylorMutch added the gator:approval-needed Gator completed review; maintainer approval needed label Dec 1, 2026
TaylorMutch
TaylorMutch previously approved these changes Dec 1, 2026
@matthewgrossman
matthewgrossman added this pull request to the merge queue Dec 1, 2026
@github-merge-queue
github-merge-queue Bot removed this pull request from the merge queue due to a conflict with the base branch Dec 1, 2026
…wgrossman

Keep both sides' suite rows, tmachine feature environments and
container-engine helpers. Refresh the drivers/docker lockfile for
testkit's new dependencies.

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

Refresh the drivers/docker lockfile for openshell-extension-core's new
dependencies (#5735).

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

Keep both sides' suite rows and tmachine feature environments. Refresh
the e2e/rust and features lockfiles.

Signed-off-by: Matthew Grossman <mgrossman@nvidia.com>
Decision D in #5297 approved dropping the checks these files still held,
and their other tests now live in testkit suites:

- ocsf_jsonl_conformance: the /var/log file-sink check (rest in
  features/ocsf)
- host_gateway_alias: host gateway reachability (rest in conformance and
  features/host-gateway)
- podman_host_gateway: reachability and the 127.0.0.53 nameserver check
  (stop/start in features/host-gateway)
- transparent_tcp: the rootless Podman musl DNS test and the private DNS
  pins test, which never ran in CI (#5916 tracks a crate-level test)

Remove them from the Podman and VM wrapper lanes and the tmachine archive
exclusions, and drop e2e/rust's openshell-ocsf-validate dependency.

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

@gator-review-bot gator-review-bot Bot left a comment

Copy link
Copy Markdown

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

gator-agent

PR Review Status

The follow-up found no blocking issues in the merge resolutions or legacy test cleanup. @matthewgrossman, I checked the cleanup against the test drops you documented in #5297.

Gator metadata
  • Validation: Follow-up to review 6123274836.
  • Docs: The delta changes test infrastructure and its contributor documentation.
  • Checks: All required checks other than Maintainer Approval are green.
  • E2E: The selected suite passed.
  • Head SHA: 6861767afd1ef89a5b53f137310fb5250dc97fff
  • Base SHA: 594e6df3cde060608b57779d67160a4ee3414471
  • Merge base SHA: 594e6df3cde060608b57779d67160a4ee3414471
  • Patch ID: 2132aed2668f2861fb7052ea37cf6d4ffa27c7d1
  • Gator payload: 19
  • Review mode: follow_up
  • Previous reviewed SHA: 49b0c8d0a0fe0459afbb4f1506b4e75414b078f8
  • Review budget exhausted: no
  • Maintainer decision required: no
  • Next state: gator:approval-needed

gator-review-bot[bot]
gator-review-bot Bot previously approved these changes Dec 2, 2026

@gator-review-bot gator-review-bot Bot left a comment

Copy link
Copy Markdown

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

gator-agent

Gator Approval

Gator review is complete and required CI has passed.

…-podman-features/matthewgrossman

Signed-off-by: Matthew Grossman <mgrossman@nvidia.com>
@matthewgrossman
matthewgrossman added this pull request to the merge queue Dec 2, 2026

@gator-review-bot gator-review-bot Bot left a comment

Copy link
Copy Markdown

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

gator-agent

PR Review Status

The only author-side change since the previous Gator review aligns the Docker test suite lockfile with the event-listener update on main. I checked the lockfile entry against main and found no blocking issues.

Gator metadata
  • Previous reviewed SHA: 6861767afd1ef89a5b53f137310fb5250dc97fff
  • Head SHA: 4893972549d941aa0372d88297c5669514aac8f9
  • Base SHA: c8053c7cce54a9dc1b4996b70ddb525f22197957
  • Merge base SHA: c8053c7cce54a9dc1b4996b70ddb525f22197957
  • Patch ID: a0bb2736bdebc749f18089b92df21d44de16219f
  • Gator payload: 19
  • Review mode: follow_up
  • Checks: Required CI passed, including the selected E2E suite.

@gator-review-bot gator-review-bot Bot left a comment

Copy link
Copy Markdown

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

gator-agent

Gator Approval

Gator review is complete and required CI has passed.

Merged via the queue into main with commit 6686f2c Dec 2, 2026
329 of 335 checks passed
@matthewgrossman
matthewgrossman deleted the test/5676-port-docker-podman-features/matthewgrossman branch December 2, 2026 20:29
@gator-review-bot

Copy link
Copy Markdown

gator-agent

Monitoring Complete

Monitoring is complete because this PR was merged.

Final status: Gator submitted its App approval on the final head before the merge.

The active Gator label can now be removed.

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 test:e2e Requires end-to-end coverage

Projects

None yet

Development

Successfully merging this pull request may close these issues.

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

2 participants