Repository navigation
test(conformance): migrate workspace lifecycle tests to workspace stories - #4607
Open
politerealism wants to merge 1 commit into
Open
politerealism wants to merge 1 commit into
politerealism wants to merge 1 commit into
Conversation
politerealism
marked this pull request as ready for review
October 15, 2026 16:36
This was referenced Oct 15, 2026
…ries Move the workspace lifecycle tests from the legacy e2e crate into a new `workspaces` conformance area. Workspace create, inspect, scope and delete behavior is not driver-specific, so it belongs with the other conformance stories and runs against any prepared gateway. The original `workspace_full_crud_lifecycle` checked seven behaviors in one test. Split it so a failure points at one behavior: - workspace_full_crud_lifecycle: create, get, list as Active, delete when empty, gone afterwards (name kept so filters keep working) - template_is_scoped_to_its_workspace (new name): a resource is listed in its own workspace and in the all-workspaces view with its owner, and not in the default workspace - workspace_terminating_rejects_creates: name kept. It now also covers the deletion guard, because a refused delete is what moves the workspace to Terminating, which is a public phase The scoped resource is a sandbox template, not a provider. The original used a provider of type `openai`, which needs a provider profile that only the wrapper lanes import. A freshly provisioned tmachine gateway has none, so those stories failed there. A template is workspace-scoped, is covered by the same delete guard, and needs no profile, credential or image. This drops the `provider list --all-workspaces` check; the all-workspaces view is still checked, for templates. Assertions check exit status and listed state from `--output json` instead of matching message text. The CLI exposes no structured error and no structured `workspace get`, so those limits are documented in the area. The paginated listings are searched, so a busy gateway does not hide an entry, and a missing collection in the output is an error. A passing story removes what it created. Cleanup runs only after a failure and reports anything other than "not found". The shared runner does not track workspaces, so this stays in the area helpers. Remove the old test file, its Cargo target and its Podman archive exclusion, and list the area in the conformance README. Contributes to NVIDIA#3954 Signed-off-by: politerealism <burdcat17@gmail.com>
politerealism
force-pushed
the
test/3954-workspace-stories/politerealism
branch
from
October 15, 2026 18:54
f5ff370 to
a2554c4
Compare
This branch has not been deployed
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
Summary
Move the workspace lifecycle tests from the legacy e2e crate into a new
workspacesconformance area. Workspace create, inspect, scope and delete behavior isn't driver-specific, so it belongs with the other conformance stories and runs against any prepared gateway. Stacked on #4538, which relocates the suites.Related Issue
Contributes to #3954. No separate issue: this migrates existing coverage.
Changes
workspacesarea (cli/tests/workspaces/) with three stories, and list it in the conformance README. The originalworkspace_full_crud_lifecyclechecked seven behaviors in one test, so it's split to make a failure point at one behavior:workspace_full_crud_lifecycle: create, get, listed as Active, delete when empty, gone afterwards. The name is kept so filters keep working.template_is_scoped_to_its_workspace(new name): a resource is listed in its own workspace and in the all-workspaces view with its owner, and isn't visible in the default workspace.workspace_terminating_rejects_creates: name kept. It now also covers the deletion guard, because a refused delete is what moves a workspace to Terminating, a phase in the publicWorkspacePhaseenum. While Terminating, new resources are rejected and existing ones can still be deleted; retrying the delete then succeeds. This is server behavior; the user docs don't describe the phase.openai, which needs a provider profile that only the wrapper lanes import. A freshly provisioned tmachine gateway has none, so those stories failed there (found by running the suite in the Ubuntu rootful Docker guest). A template is workspace-scoped, is covered by the same delete guard, and needs no profile, credential or image. This drops theprovider list --all-workspacescheck; the all-workspaces view is still checked, for templates.--output json, not message text. The CLI has no structured error and no structuredworkspace get, so those limits are documented in the area. Because a rejection by exit status could have another cause, the terminating story first creates and deletes the same template while the workspace is Active, so the later rejection can only be about the Terminating state.workspacesortemplatesarray in the output is an error, so a "not listed" check can't pass on a malformed listing.run,succeeds,fails,finish) in the area, andsandbox_templateshas its own copy. I can move a shared version into the support crate if you want one.e2e/rust/tests/workspace_lifecycle.rs, its Cargo target and its entry in the Podman archive exclusion list.Coverage after this change
The conformance archive and
e2e_run_openshell_conformancerun every test target in the conformance package, so the newworkspacesbinary runs in every lane that runs conformance. The old test was excluded from the Podman tmachine archive, so Podman gains coverage. The Docker and Kubernetes wrapper lanes run conformance first, so the coverage moves there. Kubernetes operator-workspace mode skips conformance (default workspace not allowlisted), as it did for the old test's lane, and the area documents that it isn't covered there.Testing
mise run pre-commitpassescargo test --manifest-path e2e/suites/conformance/Cargo.toml --test workspacestmachine test ubuntu-docker-rootful binaries conformance) and in the Ubuntu K3s guest (tmachine test ubuntu-k3s k3s conformance). The first Docker run is what exposed the provider-profile dependency fixed in the workspaces PR, and it also failed once on the existinglifecycle stop_start(ContainerExited: Container exited while waiting for Ready), which passed on the rerun. Each PR alone was not run in tmachine.Checklist