Run SSH and ShellHost tests
This commit is contained in:
parent
47e734c1fb
commit
fea0542d1f
|
@ -692,6 +692,7 @@ function Invoke-OpenSSHE2ETest
|
|||
# $testFolders = @(Get-ChildItem *.tests.ps1 -Recurse | ForEach-Object{ Split-Path $_.FullName} | Sort-Object -Unique)
|
||||
# Invoke-Pester $testFolders -OutputFormat NUnitXml -OutputFile $Script:E2ETestResultsFile -Tag $pri -PassThru
|
||||
Invoke-Pester .\SSH.tests.ps1 -OutputFormat NUnitXml -OutputFile $Script:E2ETestResultsFile -Tag $pri -PassThru
|
||||
Invoke-Pester .\ShellHost.tests.ps1 -OutputFormat NUnitXml -OutputFile $Script:E2ETestResultsFile -Tag $pri -PassThru
|
||||
Pop-Location
|
||||
}
|
||||
|
||||
|
|
|
@ -220,7 +220,7 @@ Describe "E2E scenarios for ssh client" -Tags "CI" {
|
|||
It "$tC.$tI - powershell as default shell and double quotes in cmdline" {
|
||||
# actual command line ssh target echo `"hello`"
|
||||
$o = ssh test_target echo `"hello`"
|
||||
$o | Should Be "`"hello`""
|
||||
$o | Should Be "hello"
|
||||
}
|
||||
It "$tC.$tI - multiple commands with double quotes in powershell cmdlet" -skip:$skip {
|
||||
# actual command line ssh target cd "$env:programfiles";pwd
|
||||
|
@ -233,7 +233,7 @@ Describe "E2E scenarios for ssh client" -Tags "CI" {
|
|||
# actual command line ssh target dir "$env:programfiles";cd "$env:programfiles";pwd
|
||||
$o = ssh test_target "dir `"`$env:programfiles\`";cd `"`$env:programfiles\`";pwd"
|
||||
$LASTEXITCODE | Should Be 0
|
||||
#$o -contains "Program Files" | Should Be $True
|
||||
#$o -contains "Program Files" | Shosshuld Be $True
|
||||
$match = $o -match "Program Files"
|
||||
$match.count | Should Be 3
|
||||
}
|
||||
|
|
|
@ -23,18 +23,18 @@ Describe "E2E scenarios for ssh-shellhost" -Tags "CI" {
|
|||
}
|
||||
|
||||
It "$tC.$tI - various quote tests" -skip:$skip {
|
||||
$o = ssh-shellhost -c cmd /c echo hello
|
||||
$o | Should Be "hello"
|
||||
$o = ssh-shellhost -c `"cmd /c echo hello`"
|
||||
$o | Should Be "hello"
|
||||
$o = ssh-shellhost -c cmd /c echo `"hello`"
|
||||
$o | Should Be "`"hello`""
|
||||
$o = ssh-shellhost -c `"cmd /c echo `"hello`"`"
|
||||
$o | Should Be "`"hello`""
|
||||
$o = ssh-shellhost -c `"cmd /c echo `"hello`"
|
||||
$o | Should Be "`"hello"
|
||||
$o = ssh-shellhost -c `"`"cmd`" /c echo `"hello`"`"
|
||||
$o | Should Be "`"hello`""
|
||||
$o = ssh-shellhost -c cmd /c echo hello
|
||||
$o | Should Be "hello"
|
||||
$o = ssh-shellhost -c "cmd /c echo hello"
|
||||
$o | Should Be "hello"
|
||||
$o = ssh-shellhost -c cmd /c echo "hello"
|
||||
$o | Should Be "hello"
|
||||
$o = ssh-shellhost -c "cmd /c echo `"hello`""
|
||||
$o | Should Be "`\`"hello`\`""
|
||||
$o = ssh-shellhost -c "cmd /c echo `"hello"
|
||||
$o | Should Be "`\`"hello"
|
||||
$o = ssh-shellhost -c "cmd" /c echo "hello"
|
||||
$o | Should Be "hello"
|
||||
|
||||
}
|
||||
|
||||
|
|
Loading…
Reference in New Issue