17efb12f6f
https://github.com/PowerShell/Win32-OpenSSH/issues/619 PowerShell/Win32-OpenSSH#623 * C2 * C3 * C4 * C5 |
||
---|---|---|
.. | ||
testdata | ||
Authorized_keys_fileperm.Tests.ps1 | ||
Cfginclude.Tests.ps1 | ||
CommonUtils.psm1 | ||
Hostkey_fileperm.Tests.ps1 | ||
KeyUtils.Tests.ps1 | ||
PlatformAbstractLayer.psm1 | ||
PortForwarding.Tests.ps1 | ||
PowerShell.SSH.Tests.ps1 | ||
README.md | ||
SCP.Tests.ps1 | ||
SFTP.Tests.ps1 | ||
SSH.Tests.ps1 | ||
SSHDConfig.tests.ps1 | ||
SSHD_Config | ||
Userkey_fileperm.Tests.ps1 | ||
known_hosts | ||
sshtest_hostkey_dsa | ||
sshtest_hostkey_dsa.pub | ||
sshtest_hostkey_ecdsa | ||
sshtest_hostkey_ecdsa.pub | ||
sshtest_hostkey_ed25519 | ||
sshtest_hostkey_ed25519.pub | ||
sshtest_hostkey_rsa | ||
sshtest_hostkey_rsa.pub | ||
sshtest_userssokey_ed25519 | ||
sshtest_userssokey_ed25519.pub |
README.md
Run OpenSSH Pester Tests:
To setup the test environment before test run:
Import-Module .\openssh-portable\contrib\win32\openssh\OpenSSHTestHelper.psm1 –Force
Setup-OpenSSHTestEnvironment
Setup-OpenSSHTestEnvironment
contains below parameters:
-OpenSSHBinPath
: Specify the location where ssh.exe should be picked up. If not specified, the function will prompt to user if he/she want to choose the first ssh.exe found in$env:path
if exists.-TestDataPath
: Specify the location where the test binaries deploy to. The default is$env:SystemDrive\OpenSSHTests
if it not specified.-Quiet
: If it is set, the function will do all the changes without prompting to user to confirm.-DebugMode
: If it is set, the subsequent tests will be running in debug mode. User can modify by setting $OpenSSHTestInfo["DebugMode"] .
To run the test suites:
Run-OpenSSHE2ETest
Run-OpenSSHUnitTest
To run a particular test, just run the script or the executatlbe directly
C:\git\openssh-portable\regress\pesterTests\SCP.Tests.ps1
C:\git\openssh-portable\bin\x64\Release\unittest-bitmap\unittest-bitmap.exe
To verify / modify (Ex- DebugMode) the Test setup environment
$OpenSSHTestInfo
$OpenSSHTestInfo["DebugMode"] = $true
To revert what's done in Setup-OpenSSHTestEnvironment:
Cleanup-OpenSSHTestEnvironment