Skip to content
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension


Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
5 changes: 0 additions & 5 deletions e2e/rust/Cargo.toml
Original file line number Diff line number Diff line change
Expand Up @@ -226,11 +226,6 @@ name = "forward_proxy_jsonrpc_l7"
path = "tests/forward_proxy_jsonrpc_l7.rs"
required-features = ["e2e-host-gateway"]

[[test]]
name = "workspace_lifecycle"
path = "tests/workspace_lifecycle.rs"
required-features = ["e2e"]

[[test]]
name = "supervisor_middleware_http_hooks"
path = "tests/supervisor_middleware_http_hooks.rs"
Expand Down
278 changes: 0 additions & 278 deletions e2e/rust/tests/workspace_lifecycle.rs

This file was deleted.

1 change: 1 addition & 0 deletions tests/suites/conformance/README.md
Original file line number Diff line number Diff line change
Expand Up @@ -23,6 +23,7 @@ nextest run the tests as the library's unit tests. The crate also builds the
| `labels` | Labels are stored and select sandboxes in `sandbox list` |
| `templates` | A sandbox created from a template uses its workload; duplicate, deleted and missing templates return the right errors |
| `settings` | Sandbox-scoped settings |
| `workspaces` | Workspace create, get, list and delete; a template is scoped to its workspace; a workspace holding a resource goes Terminating, rejects creates and deletes once empty |
| `process` | Core dumps are disabled for sandbox processes |
| `filesystem-policy` | Landlock: a hard requirement accepts added device paths; a replaced policy path rejects the next launch |

Expand Down
49 changes: 5 additions & 44 deletions tests/suites/conformance/src/cli.rs
Original file line number Diff line number Diff line change
Expand Up @@ -11,11 +11,6 @@
use serde_json::Value;
use testkit::Context;

const PAGE_SIZE: &str = "1000";
/// More pages than any test gateway should have; stops a repeated token from
/// looping forever.
const MAX_PAGES: usize = 1000;

/// Delay before an attached main prints and exits, so the CLI attaches while
/// the sandbox is Ready. On a multi-replica gateway, attaching after the main
/// has exited fails unless the request reaches the replica holding the
Expand Down Expand Up @@ -226,44 +221,10 @@ async fn wait_unlisted(cx: &Context, name: &str) -> testkit::Result {
.await
}

/// The phase of the sandbox in `sandbox list`, if it is listed. Follows every
/// page.
/// The phase of the sandbox in `sandbox list`, if it is listed.
async fn find_listed(cx: &Context, name: &str) -> testkit::Result<Option<String>> {
let mut token = String::new();
for _ in 0..MAX_PAGES {
let page: Value = cx
.cli([
"sandbox",
"list",
"--page-size",
PAGE_SIZE,
"--page-token",
&token,
"--output",
"json",
])
.await?
.success()?
.json()?;
if let Some(entry) = page["sandboxes"]
.as_array()
.into_iter()
.flatten()
.find(|entry| entry["name"] == name)
{
return Ok(Some(
entry["phase"].as_str().unwrap_or_default().to_string(),
));
}
token = page["next_page_token"]
.as_str()
.unwrap_or_default()
.to_string();
if token.is_empty() {
return Ok(None);
}
}
Err(testkit::Error::msg(format!(
"sandbox list has more than {MAX_PAGES} pages"
)))
let entry = cx
.cli_find_listed(&["sandbox", "list"], "sandboxes", name)
.await?;
Ok(entry.map(|entry| entry["phase"].as_str().unwrap_or_default().to_string()))
}
1 change: 1 addition & 0 deletions tests/suites/conformance/src/lib.rs
Original file line number Diff line number Diff line change
Expand Up @@ -25,3 +25,4 @@ mod settings;
mod smoke;
mod ssh;
mod templates;
mod workspaces;
Loading
Loading