Repository navigation
test(conformance): port workspace lifecycle tests to testkit - #4607
Conversation
f5ff370 to
a2554c4
Compare
|
This pull request has had no activity for 14 days and is now marked stale. |
Move e2e/rust workspace_lifecycle into a conformance workspaces suite on #[testkit::test], split into workspace_full_crud_lifecycle, template_is_scoped_to_its_workspace and workspace_terminating_rejects_creates. Use a sandbox template as the scoped resource so no provider profile is needed, and assert on exit status and listed state rather than message text. Drop the legacy test, its Cargo target, and its Podman archive exclusion. Supersedes NVIDIA#4607. Signed-off-by: Evan Lezar <elezar@nvidia.com>
a2554c4 to
30f47a9
Compare
Maintainer list changeGains approval rights: Confirm every change is intended. Anyone listed here can single-handedly satisfy |
Move e2e/rust workspace_lifecycle into a conformance workspaces suite on #[testkit::test], split into workspace_full_crud_lifecycle, template_is_scoped_to_its_workspace and workspace_terminating_rejects_creates. Use a sandbox template as the scoped resource so no provider profile is needed, and assert on exit status and listed state rather than message text. Drop the legacy test, its Cargo target, and its Podman archive exclusion. Supersedes NVIDIA#4607. Signed-off-by: Evan Lezar <elezar@nvidia.com>
30f47a9 to
d63af4f
Compare
|
Label |
|
/ok-to-test d63af4f |
matthewgrossman
left a comment
There was a problem hiding this comment.
Thanks, this looks good. I went through both old tests line by line, and every check is still covered. Several are tighter now: the Terminating check targets this workspace, the scoped listings check the owner, and the control before the rejected create is a nice touch. Switching from a provider to a template makes sense given the profile requirement.
Approving, but before merge I'd like the Terminating check after the refused delete in workspace_full_crud_lifecycle and the find_entry move into testkit. The other inline comments are nits. Could you also retitle the PR to "test(conformance): port workspace lifecycle tests to testkit" so the squash commit reads well?
d63af4f to
fe47492
Compare
|
Thanks for the review. I've addressed everything in fe47492 and retitled the PR as you suggested. It's still a single commit. CI needs |
|
/ok-to-test fe47492 |
Move e2e/rust workspace_lifecycle into a conformance workspaces suite on #[testkit::test], split into workspace_full_crud_lifecycle, template_is_scoped_to_its_workspace and workspace_terminating_rejects_creates. Use a sandbox template as the scoped resource so no provider profile is needed, and assert on exit status and listed state rather than message text. A refused workspace delete is checked to leave the workspace Terminating, so the failure is the resource guard rather than an unrelated error. Add Context::cli_find_listed to testkit to find an entry in a paginated --output json listing, erroring when the collection key is missing. Use it in the workspaces suite and in conformance/src/cli.rs, and list it in the testkit README. Drop the legacy test, its Cargo target, and its Podman archive exclusion. Signed-off-by: Evan Lezar <elezar@nvidia.com> Signed-off-by: politerealism <burdcat17@gmail.com>
fe47492 to
56a9397
Compare
|
/ok-to-test 56a9397 |
Summary
Move the workspace lifecycle tests from the legacy e2e crate into the testkit conformance suite. Workspace create, scoping and delete behavior isn't driver-specific, so the tests run against any prepared gateway.
Related Issue
Closes #5598. Part of #5281.
Changes
tests/suites/conformance/src/workspaces.rswith three#[testkit::test]tests, and aworkspacesrow in the conformance README:workspace_full_crud_lifecycle: create, get, listed as Active, a delete refused while it holds a resource leaves it Terminating, delete when empty, gone afterwards. The original checked seven behaviors in one test, so it's split. The name is kept so filters keep working.template_is_scoped_to_its_workspace(new): a resource is listed in its own workspace and in the all-workspaces view with its owner, and isn't visible in the test's workspace.workspace_terminating_rejects_creates: a refused delete leaves the workspace Terminating. New resources are rejected, existing ones can still be deleted, and retrying the delete then succeeds.Context::cli_find_listedto testkit: finds an entry in a paginated--output jsonlisting and errors when the listing lacks the collection key.find_listedinconformance/src/cli.rsnow uses it, and the testkit README lists it.e2e/rust/tests/workspace_lifecycle.rs, its Cargo target and its entry in the Podman archive exclusion list.Testing
ubuntu-k3sconformance row in CI (passed before the review changes; rerun pending).Checklist