mirror of
https://github.com/NVIDIA/OpenShell.git
synced 2026-10-14 04:59:28 +08:00
Move behavioral suites under e2e/suites and extract shared Rust tooling into e2e/support/rust. Organize conformance tests into one Cargo target per area with story modules containing the tests and assertions. Remove the separate scenario crate and registry, and split lifecycle coverage into independent stop/start and stopped-deletion stories. Reuse shared helpers from the existing Rust harness, preserve artifact packaging and focused test selection, and include tooling and pure assertion tests in test:rust and branch checks. Update authoring guidance for required behavior and retained failures with explicit waivers. Closes #4119 Signed-off-by: Evan Lezar <elezar@nvidia.com>
Shared Rust e2e tooling
openshell-e2e-support provides tooling for conformance, feature, driver, and
existing Rust e2e tests. It is a standalone test crate; product crates must not
depend on it.
- The CLI runner captures stdout, stderr, exit status, duration, and diagnostic context. Commands have explicit timeouts, and polling preserves the last observation on failure.
- Resource tracking cleans up explicitly registered sandboxes through
finish()and retains the original test failure when cleanup also fails. executorprovides process execution and an injectable boundary for unit tests.binaryresolvesOPENSHELL_BINor a previously built checkout CLI and supports PTY invocation. Archive-based suites useOpenShellRunner::from_env()to require an explicit candidate binary.outputparses CLI text and strips ANSI formatting.portprovides TCP readiness checks and available-port discovery.
Conformance scenarios remain in e2e/suites/conformance/cli/tests. Container
fixtures, gateway restart controls, and suite-specific workload defaults remain
in the existing openshell-e2e harness. That harness re-exports binary, output,
and port to preserve existing test imports.
Run the tooling unit tests without a gateway:
cargo test --locked --manifest-path e2e/support/rust/Cargo.toml
mise run test:rust and branch Rust checks include these tests.