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
6 changes: 2 additions & 4 deletions e2e/rust/tests/oidc_pkce.rs
Original file line numberDiff line numberDiff line change
Expand Up@@ -1388,6 +1388,7 @@ async fn assert_can_create_sandbox(session: &LoginSession, workspace: &str, sand
"--name",
sandbox_name,
"--no-tty",
"--detach",
"--",
"sh",
"-c",
Expand All@@ -1412,10 +1413,6 @@ async fn assert_can_create_sandbox(session: &LoginSession, workspace: &str, sand
let list_output = combined_output(&list);
let cleanup = run_workspace_cli(session, workspace, &["sandbox", "delete", sandbox_name]).await;

assert!(
create_output.contains(&marker),
"sandbox command output should contain {marker}:\n{create_output}"
);
assert!(
list.status.success() && list_output.contains(sandbox_name),
"created sandbox {sandbox_name} should appear in the sandbox list:\n{list_output}"
Expand All@@ -1438,6 +1435,7 @@ async fn assert_can_delete_sandbox(session: &LoginSession, workspace: &str, sand
"--name",
sandbox_name,
"--no-tty",
"--detach",
"--",
"sh",
"-c",
Expand Down
15 changes: 3 additions & 12 deletions e2e/rust/tests/workspace_namespace_managed.rs
Original file line numberDiff line numberDiff line change
Expand Up@@ -148,6 +148,7 @@ async fn managed_creates_namespace_with_labels() {
&ws,
"--name",
"mgd-sb",
"--detach",
"--",
"sh",
"-c",
Expand All@@ -157,10 +158,6 @@ async fn managed_creates_namespace_with_labels() {
])
.await;
assert!(ok, "sandbox create failed: {out}");
assert!(
out.contains("managed-ok"),
"sandbox output missing expected string: {out}"
);

// Verify the managed namespace was created.
let (ok, out) = kubectl(&["get", "namespace", &ns]).await;
Expand DownExpand Up@@ -460,6 +457,7 @@ async fn managed_workspace_delete_removes_namespace() {
&ws,
"--name",
"del-sb",
"--detach",
"--",
"sh",
"-c",
Expand All@@ -469,10 +467,6 @@ async fn managed_workspace_delete_removes_namespace() {
])
.await;
assert!(ok, "sandbox create failed: {out}");
assert!(
out.contains("del-ok"),
"sandbox output missing expected string: {out}"
);

let (ok, _) = kubectl(&["get", "namespace", &ns]).await;
assert!(
Expand DownExpand Up@@ -535,6 +529,7 @@ async fn managed_tls_secret_copied_to_namespace() {
&ws,
"--name",
"tls-sb",
"--detach",
"--",
"sh",
"-c",
Expand All@@ -544,10 +539,6 @@ async fn managed_tls_secret_copied_to_namespace() {
])
.await;
assert!(ok, "sandbox create failed: {out}");
assert!(
out.contains("tls-ok"),
"sandbox output missing expected string: {out}"
);

let (ok, out) = kubectl(&["get", "secret", "openshell-client-tls", "-n", &ns]).await;
assert!(
Expand Down
7 changes: 1 addition & 6 deletions e2e/rust/tests/workspace_namespace_operator.rs
Original file line numberDiff line numberDiff line change
Expand Up@@ -162,7 +162,6 @@ async fn operator_sandbox_in_labeled_namespace() {

// Poll until the gateway's namespace watcher discovers the labeled namespace
// and sandbox creation succeeds (up to 30s).
let mut sandbox_out = String::new();
let deadline = tokio::time::Instant::now() + Duration::from_secs(30);
loop {
let (ok, out) = run_cli(&[
Expand All@@ -172,6 +171,7 @@ async fn operator_sandbox_in_labeled_namespace() {
&ns,
"--name",
"op-sb",
"--detach",
"--",
"sh",
"-c",
Expand All@@ -181,18 +181,13 @@ async fn operator_sandbox_in_labeled_namespace() {
])
.await;
if ok {
sandbox_out = out;
break;
}
if tokio::time::Instant::now() >= deadline {
panic!("sandbox create did not succeed within 30s: {out}");
}
tokio::time::sleep(Duration::from_secs(2)).await;
}
assert!(
sandbox_out.contains("operator-ok"),
"sandbox output missing expected string: {sandbox_out}"
);

// Verify the sandbox CR lives in the pre-provisioned namespace.
let (ok, out) = kubectl(&["get", "sandbox.agents.x-k8s.io", "-n", &ns, "-o", "name"]).await;
Expand Down
Loading