()
| 454 | |
| 455 | #[test_log::test(tokio::test)] |
| 456 | async fn test_memory_executor_forwards_path() { |
| 457 | let custom_path = "/custom/test/path"; |
| 458 | let current_path = std::env::var("PATH").unwrap(); |
| 459 | let modified_path = format!("{custom_path}:{current_path}"); |
| 460 | |
| 461 | let cmd = format!( |
| 462 | r#" |
| 463 | if ! echo "$PATH" | grep -q "{custom_path}"; then |
| 464 | echo "FAIL: PATH does not contain custom path {custom_path}" |
| 465 | echo "Got PATH: $PATH" |
| 466 | exit 1 |
| 467 | fi |
| 468 | "# |
| 469 | ); |
| 470 | let config = memory_config(&cmd); |
| 471 | let (execution_context, _temp_dir) = create_test_setup(config).await; |
| 472 | let (_permit, _lock, mut executor) = get_memory_executor().await; |
| 473 | |
| 474 | temp_env::async_with_vars(&[("PATH", Some(&modified_path))], async { |
| 475 | executor.run(&execution_context, &None).await.unwrap(); |
| 476 | }) |
| 477 | .await; |
| 478 | } |
| 479 | } |
nothing calls this directly
no test coverage detected