File tree Expand file tree Collapse file tree
crates/openshell-driver-mxc/src Expand file tree Collapse file tree Original file line number Diff line number Diff 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 ( )
You can’t perform that action at this time.
0 commit comments