Skip to content

Commit 2a39a98

Browse files
committed
test(mxc): provide workload dir for CA staging
Signed-off-by: Prekshi Vyas <prekshivyas@nvidia.com>
1 parent 0348267 commit 2a39a98

1 file changed

Lines changed: 13 additions & 2 deletions

File tree

‎crates/openshell-driver-mxc/src/driver.rs‎

Lines changed: 13 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -2721,6 +2721,8 @@ mod lifecycle_tests {
27212721

27222722
let shell =
27232723
std::env::var("COMSPEC").unwrap_or_else(|_| r"C:\Windows\System32\cmd.exe".to_string());
2724+
let workload = tempfile::tempdir().expect("temporary workload directory");
2725+
let workload_dir = workload.path().to_string_lossy().into_owned();
27242726
let mut policy = fs_policy(&[]);
27252727
policy.network_policies.insert(
27262728
"github".to_string(),
@@ -2735,10 +2737,19 @@ mod lifecycle_tests {
27352737
provider_credentialed: true,
27362738
..Default::default()
27372739
}],
2738-
binaries: vec![NetworkBinary { path: shell }],
2740+
binaries: vec![NetworkBinary {
2741+
path: shell.clone(),
2742+
}],
27392743
},
27402744
);
2741-
let mut sandbox = with_policy(driver_sandbox("sb-provider-env"), policy);
2745+
let mut sandbox = with_policy(
2746+
driver_sandbox_with_command(
2747+
"sb-provider-env",
2748+
&workload_dir,
2749+
vec![shell, "/c".into(), "exit 0".into()],
2750+
),
2751+
policy,
2752+
);
27422753
sandbox
27432754
.spec
27442755
.as_mut()

0 commit comments

Comments
 (0)