mirror of
https://github.com/PowerShell/openssh-portable.git
synced 2025-07-30 09:14:59 +02:00
Minor update on scp tests (#178)
1. remove -P option since test_target already has the port specified 2. adding quotes to sshcmd path
This commit is contained in:
parent
69258a6e02
commit
7cadeeb91b
@ -37,38 +37,35 @@ Describe "Tests for scp command" -Tags "CI" {
|
|||||||
Title = 'Simple copy local file to local file'
|
Title = 'Simple copy local file to local file'
|
||||||
Source = $SourceFilePath
|
Source = $SourceFilePath
|
||||||
Destination = $DestinationFilePath
|
Destination = $DestinationFilePath
|
||||||
Options = "-P $port "
|
|
||||||
},
|
},
|
||||||
@{
|
@{
|
||||||
Title = 'Simple copy local file to remote file'
|
Title = 'Simple copy local file to remote file'
|
||||||
Source = $SourceFilePath
|
Source = $SourceFilePath
|
||||||
Destination = "test_target:$DestinationFilePath"
|
Destination = "test_target:$DestinationFilePath"
|
||||||
Options = "-P $port -S $sshcmd"
|
Options = "-S '$sshcmd'"
|
||||||
},
|
},
|
||||||
@{
|
@{
|
||||||
Title = 'Simple copy remote file to local file'
|
Title = 'Simple copy remote file to local file'
|
||||||
Source = "test_target:$SourceFilePath"
|
Source = "test_target:$SourceFilePath"
|
||||||
Destination = $DestinationFilePath
|
Destination = $DestinationFilePath
|
||||||
Options = "-P $port -p -c aes128-ctr -C"
|
Options = "-p -c aes128-ctr -C"
|
||||||
},
|
},
|
||||||
@{
|
@{
|
||||||
Title = 'Simple copy local file to local dir'
|
Title = 'Simple copy local file to local dir'
|
||||||
Source = $SourceFilePath
|
Source = $SourceFilePath
|
||||||
Destination = $DestinationDir
|
Destination = $DestinationDir
|
||||||
Options = "-P $port "
|
|
||||||
},
|
},
|
||||||
@{
|
@{
|
||||||
Title = 'simple copy local file to remote dir'
|
Title = 'simple copy local file to remote dir'
|
||||||
Source = $SourceFilePath
|
Source = $SourceFilePath
|
||||||
Destination = "test_target:$DestinationDir"
|
Destination = "test_target:$DestinationDir"
|
||||||
Options = "-P $port -C -q"
|
Options = "-C -q"
|
||||||
}<#,
|
},
|
||||||
@{
|
@{
|
||||||
Title = 'simple copy remote file to local dir'
|
Title = 'simple copy remote file to local dir'
|
||||||
Source = "test_target:$SourceFilePath"
|
Source = "test_target:$SourceFilePath"
|
||||||
Destination = $DestinationDir
|
Destination = $DestinationDir
|
||||||
Options = "-P $port "
|
}
|
||||||
}#>
|
|
||||||
)
|
)
|
||||||
|
|
||||||
$testData1 = @(
|
$testData1 = @(
|
||||||
@ -76,7 +73,7 @@ Describe "Tests for scp command" -Tags "CI" {
|
|||||||
Title = 'copy from local dir to remote dir'
|
Title = 'copy from local dir to remote dir'
|
||||||
Source = $sourceDir
|
Source = $sourceDir
|
||||||
Destination = "test_target:$DestinationDir"
|
Destination = "test_target:$DestinationDir"
|
||||||
Options = "-P $port -r -p -c aes128-ctr"
|
Options = "-r -p -c aes128-ctr"
|
||||||
},
|
},
|
||||||
@{
|
@{
|
||||||
Title = 'copy from local dir to local dir'
|
Title = 'copy from local dir to local dir'
|
||||||
@ -88,7 +85,7 @@ Describe "Tests for scp command" -Tags "CI" {
|
|||||||
Title = 'copy from remote dir to local dir'
|
Title = 'copy from remote dir to local dir'
|
||||||
Source = "test_target:$sourceDir"
|
Source = "test_target:$sourceDir"
|
||||||
Destination = $DestinationDir
|
Destination = $DestinationDir
|
||||||
Options = "-P $port -C -r -q"
|
Options = "-C -r -q"
|
||||||
}
|
}
|
||||||
)
|
)
|
||||||
|
|
||||||
@ -150,7 +147,7 @@ Describe "Tests for scp command" -Tags "CI" {
|
|||||||
|
|
||||||
|
|
||||||
It 'File copy: <Title> ' -TestCases:$testData {
|
It 'File copy: <Title> ' -TestCases:$testData {
|
||||||
param([string]$Title, $Source, $Destination, $Options)
|
param([string]$Title, $Source, $Destination, [string]$Options)
|
||||||
|
|
||||||
iex "scp $Options $Source $Destination"
|
iex "scp $Options $Source $Destination"
|
||||||
$LASTEXITCODE | Should Be 0
|
$LASTEXITCODE | Should Be 0
|
||||||
@ -168,7 +165,7 @@ Describe "Tests for scp command" -Tags "CI" {
|
|||||||
}
|
}
|
||||||
|
|
||||||
It 'Directory recursive copy: <Title> ' -TestCases:$testData1 {
|
It 'Directory recursive copy: <Title> ' -TestCases:$testData1 {
|
||||||
param([string]$Title, $Source, $Destination, $Options)
|
param([string]$Title, $Source, $Destination, [string]$Options)
|
||||||
|
|
||||||
iex "scp $Options $Source $Destination"
|
iex "scp $Options $Source $Destination"
|
||||||
$LASTEXITCODE | Should Be 0
|
$LASTEXITCODE | Should Be 0
|
||||||
|
Loading…
x
Reference in New Issue
Block a user