Skip to content

Expand test suite #787

New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Open
wants to merge 17 commits into
base: latestw_all
Choose a base branch
from
Open

Conversation

tgauth
Copy link
Collaborator

@tgauth tgauth commented Apr 17, 2025

PR Summary

  • update SCP.tests.ps1 and SFTP.Tests.ps1 with large file transfer and default shell tests
  • update SSH.tests.ps1 with explicit test for disabling pty-allocation
  • add Terminal.Tests.ps1 intended to run from interactive terminal (and skipped during CI) for pty-allocation test (and eventually more terminal tests).
  • refactor test setup to install cygwin before running pester tests (pre-req for default shell tests)

PR Context

  • expanding automated test suite

@tgauth
Copy link
Collaborator Author

tgauth commented Apr 17, 2025

/azp run

Copy link

Azure Pipelines successfully started running 1 pipeline(s).

@tgauth
Copy link
Collaborator Author

tgauth commented Apr 29, 2025

/azp run

Copy link

Azure Pipelines successfully started running 1 pipeline(s).

@tgauth
Copy link
Collaborator Author

tgauth commented Apr 30, 2025

/azp run

Copy link

Azure Pipelines successfully started running 1 pipeline(s).

@tgauth
Copy link
Collaborator Author

tgauth commented Apr 30, 2025

/azp run

Copy link

Azure Pipelines successfully started running 1 pipeline(s).

@tgauth
Copy link
Collaborator Author

tgauth commented Apr 30, 2025

/azp run

Copy link

Azure Pipelines successfully started running 1 pipeline(s).

@tgauth
Copy link
Collaborator Author

tgauth commented Apr 30, 2025

/azp run

Copy link

Azure Pipelines successfully started running 1 pipeline(s).

@tgauth
Copy link
Collaborator Author

tgauth commented May 1, 2025

/azp run

Copy link

Azure Pipelines successfully started running 1 pipeline(s).

@tgauth
Copy link
Collaborator Author

tgauth commented May 1, 2025

/azp run

Copy link

Azure Pipelines successfully started running 1 pipeline(s).

@tgauth
Copy link
Collaborator Author

tgauth commented May 1, 2025

/azp run

Copy link

Azure Pipelines successfully started running 1 pipeline(s).

@tgauth
Copy link
Collaborator Author

tgauth commented May 1, 2025

/azp run

@tgauth tgauth changed the title [WIP] Expand test suite Expand test suite May 1, 2025
Copy link

Azure Pipelines successfully started running 1 pipeline(s).

@tgauth tgauth requested a review from vthiebaut10 May 1, 2025 20:34
@tgauth tgauth requested a review from Copilot June 4, 2025 20:10
Copy link

@Copilot Copilot AI left a comment

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 expands the automated test suite with large file transfer scenarios, explicit pty-allocation toggles, and default shell configuration tests, and refactors the build tooling to ensure Cygwin is installed before running Pester tests.

  • Add Terminal.Tests.ps1 for interactive pty-allocation test scaffolding
  • Extend SSH, SFTP, and SCP tests with large file transfers and default shell configuration contexts
  • Refactor AzDOBuildTools.psm1 to install Cygwin before running E2E tests

Reviewed Changes

Copilot reviewed 5 out of 5 changed files in this pull request and generated 2 comments.

Show a summary per file
File Description
regress/pesterTests/Terminal.Tests.ps1 New interactive terminal allocation test
regress/pesterTests/SSH.Tests.ps1 Add “disable pseudo-terminal allocation (-T)” test
regress/pesterTests/SFTP.Tests.ps1 Introduce large-file tests and default shell setup
regress/pesterTests/SCP.Tests.ps1 Add large-file SCP tests and default shell configuration
contrib/win32/openssh/AzDOBuildTools/AzDOBuildTools.psm1 Reorder E2E test invocation after Cygwin check and installation
Comments suppressed due to low confidence (3)

regress/pesterTests/SFTP.Tests.ps1:162

  • [nitpick] Property key casing is inconsistent with earlier ExpectedOutput; use a uniform name (ExpectedOutput) for clarity.
expectedoutput = (join-path $serverdirectory $largeFileName)

regress/pesterTests/SCP.Tests.ps1:213

  • The large file created for tests ($largeFilePath) isn't removed in AfterAll, leading to orphaned files; add cleanup.
AfterAll {

contrib/win32/openssh/AzDOBuildTools/AzDOBuildTools.psm1:255

  • The string interpolation with nested double quotes will break parsing; use $($OpenSSHTestInfo["E2ETestResultsFile"]) or escape the inner quotes.
Write-BuildMessage -Message "Test result file $OpenSSHTestInfo["E2ETestResultsFile"] not found after tests." -Category Error

@tgauth
Copy link
Collaborator Author

tgauth commented Jun 4, 2025

/azp run

Copy link

Azure Pipelines successfully started running 1 pipeline(s).

@tgauth
Copy link
Collaborator Author

tgauth commented Jun 5, 2025

/azp run

Copy link

Azure Pipelines successfully started running 1 pipeline(s).

@tgauth
Copy link
Collaborator Author

tgauth commented Jun 5, 2025

/azp run

Copy link

Azure Pipelines successfully started running 1 pipeline(s).

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.

1 participant