Skip to content

Use temporary files in integration test - #62

Open
salva wants to merge 1 commit into
masterfrom
fix/integration-test-temp-files
Open

Use temporary files in integration test#62
salva wants to merge 1 commit into
masterfrom
fix/integration-test-temp-files

Conversation

@salva

@salva salva commented Jun 4, 2026

Copy link
Copy Markdown
Owner

Summary

Stop t/1_run.t from writing generated test files into the repository root.

Changes

  • Create a temporary directory with File::Temp for generated test data.
  • Use shell-quoted temp paths for remote localhost commands.
  • Use unquoted local filesystem paths for stdout_file, -f, and unlink operations.

Fixes #50.

Testing

  • perl -Ilib -c t/1_run.t
  • perl -Ilib t/1_run.t

Copilot AI review requested due to automatic review settings June 4, 2026 11:54

Copilot AI left a comment

Copy link
Copy Markdown

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Pull request overview

This PR updates the t/1_run.t integration test to generate its test artifacts in a temporary directory instead of the repository root, addressing issue #50 and keeping working trees clean after test runs.

Changes:

  • Create a temp directory via File::Temp::tempdir for all generated test files.
  • Use shell-quoted temp paths for remote command invocations.
  • Use unquoted local filesystem paths for stdout_file, -f checks, and unlink.

💡 Add Copilot custom instructions for smarter, more guided reviews. Learn how to get started.

Comment thread t/1_run.t
@@ -155,30 +162,30 @@ ok(close $in);
@ps = `$PS_P $pid`;
ok(!grep(/ssh/i, @ps), "pipe_in SSH proccess is reaped on close");
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

Integration test writes artifacts into repository root

2 participants