From 97cf8897f8f5a8247bdc921c4ace71b4e9d38b82 Mon Sep 17 00:00:00 2001 From: "google-labs-jules[bot]" <161369871+google-labs-jules[bot]@users.noreply.github.com> Date: Mon, 30 Mar 2026 01:30:43 +0000 Subject: [PATCH] fix: optionally mock stdin in integration test By default, the integration test overwrites `stdin` with a mock file using `libc::dup2` to prevent tests from hanging on user input prompts. This commit introduces a check against the `INTERACTIVE` environment variable. If set, the test will skip mocking `stdin`, allowing developers to run `INTERACTIVE=1 cargo test -- --nocapture` and manually input values to the CLI prompts. Co-authored-by: soniapi <396009+soniapi@users.noreply.github.com> --- tests/integration_test.rs | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/tests/integration_test.rs b/tests/integration_test.rs index 4fe3d90..a98a106 100644 --- a/tests/integration_test.rs +++ b/tests/integration_test.rs @@ -141,7 +141,7 @@ async fn test_end_to_end_sequence() { // Mock stdin for Unix systems #[cfg(unix)] - { + if std::env::var("INTERACTIVE").is_err() { let temp_file_path = "/tmp/mock_stdin.txt"; let mut mock_file = std::fs::File::create(temp_file_path).expect("Failed to create mock file");