Skip to content

Commit 3cd2ddf

Browse files
committed
test(e2e): run tool-dependent VM tests from the community base image
The host_gateway_alias and vm_corporate_proxy workloads run curl and python3. The VM driver now defaults to nvcr.io/nvidia/base/ubuntu:24.04, which ships neither, so these tests fail in VM E2E with "command not found". Request the community base image explicitly with `--from base`. Docker, Podman, and Kubernetes E2E already default to that image, so their behavior is unchanged. Signed-off-by: Emilien Macchi <[email protected]>
1 parent af3c7f3 commit 3cd2ddf

2 files changed

Lines changed: 32 additions & 8 deletions

File tree

‎e2e/rust/tests/host_gateway_alias.rs‎

Lines changed: 6 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -315,7 +315,11 @@ async fn sandbox_reaches_host_openshell_internal_via_host_gateway_alias() {
315315
.expect("temp policy path should be utf-8")
316316
.to_string();
317317

318+
// The workload needs curl, which minimal default images such as the VM
319+
// driver's nvcr.io/nvidia/base/ubuntu do not ship.
318320
let guard = SandboxGuard::create(&[
321+
"--from",
322+
"base",
319323
"--policy",
320324
&policy_path,
321325
"--",
@@ -404,6 +408,8 @@ async fn static_provider_credentials_are_bound_to_profile_endpoints() {
404408
server.port, server.port, server.port
405409
);
406410
let mut guard = SandboxGuard::create(&[
411+
"--from",
412+
"base",
407413
"--policy",
408414
&policy_path,
409415
"--provider",

‎e2e/rust/tests/vm_corporate_proxy.rs‎

Lines changed: 26 additions & 8 deletions
Original file line numberDiff line numberDiff line change
@@ -738,10 +738,20 @@ async fn vm_corporate_proxy_routes_approved_tls_egress() {
738738
// ── Run the workload ──────────────────────────────────────────────
739739
let (_policy, policy_path) = temp_file_with(&policy_yaml(&ports), "policy file");
740740
let script = workload_script(&ports);
741-
let mut sandbox =
742-
SandboxGuard::create(&["--policy", &policy_path, "--", "python3", "-c", &script])
743-
.await
744-
.expect("create VM sandbox behind the corporate proxy");
741+
// The workload runs python3, which the VM driver's default
742+
// nvcr.io/nvidia/base/ubuntu image does not ship.
743+
let mut sandbox = SandboxGuard::create(&[
744+
"--from",
745+
"base",
746+
"--policy",
747+
&policy_path,
748+
"--",
749+
"python3",
750+
"-c",
751+
&script,
752+
])
753+
.await
754+
.expect("create VM sandbox behind the corporate proxy");
745755

746756
assert_proxied_egress(
747757
&sandbox.create_output,
@@ -805,10 +815,18 @@ async fn vm_corporate_proxy_trusts_ca_bundle_for_https_proxy() {
805815

806816
let (_policy, policy_path) = temp_file_with(&policy_yaml(&ports), "policy file");
807817
let script = workload_script(&ports);
808-
let mut sandbox =
809-
SandboxGuard::create(&["--policy", &policy_path, "--", "python3", "-c", &script])
810-
.await
811-
.expect("create VM sandbox behind the https corporate proxy");
818+
let mut sandbox = SandboxGuard::create(&[
819+
"--from",
820+
"base",
821+
"--policy",
822+
&policy_path,
823+
"--",
824+
"python3",
825+
"-c",
826+
&script,
827+
])
828+
.await
829+
.expect("create VM sandbox behind the https corporate proxy");
812830

813831
let proxy_logs = proxy.logs().expect("read https proxy logs");
814832
assert!(

0 commit comments

Comments
 (0)