File tree Expand file tree Collapse file tree
Expand file tree Collapse file tree Original file line number Diff line number Diff line change @@ -417,4 +417,29 @@ mod memory {
417417 )
418418 . await ;
419419 }
420+
421+ #[ test_log:: test( tokio:: test) ]
422+ async fn test_memory_executor_forwards_path ( ) {
423+ let custom_path = "/custom/test/path" ;
424+ let current_path = std:: env:: var ( "PATH" ) . unwrap ( ) ;
425+ let modified_path = format ! ( "{custom_path}:{current_path}" ) ;
426+
427+ let cmd = format ! (
428+ r#"
429+ if ! echo "$PATH" | grep -q "{custom_path}"; then
430+ echo "FAIL: PATH does not contain custom path {custom_path}"
431+ echo "Got PATH: $PATH"
432+ exit 1
433+ fi
434+ "#
435+ ) ;
436+ let config = memory_config ( & cmd) ;
437+ let ( execution_context, _temp_dir) = create_test_setup ( config) . await ;
438+ let ( _permit, _lock, executor) = get_memory_executor ( ) . await ;
439+
440+ temp_env:: async_with_vars ( & [ ( "PATH" , Some ( & modified_path) ) ] , async {
441+ executor. run ( & execution_context, & None ) . await . unwrap ( ) ;
442+ } )
443+ . await ;
444+ }
420445}
You can’t perform that action at this time.
0 commit comments