mirror of
https://github.com/PowerShell/openssh-portable.git
synced 2025-07-31 01:35:11 +02:00
remove debug statements from pester tests
This commit is contained in:
parent
a6248c1e5b
commit
e10443e229
@ -198,7 +198,7 @@ Describe "Tests for scp command" -Tags "CI" {
|
|||||||
}
|
}
|
||||||
|
|
||||||
BeforeAll {
|
BeforeAll {
|
||||||
#$null = New-Item $DestinationDir -ItemType directory -Force -ErrorAction SilentlyContinue
|
$null = New-Item $DestinationDir -ItemType directory -Force -ErrorAction SilentlyContinue
|
||||||
}
|
}
|
||||||
|
|
||||||
AfterEach {
|
AfterEach {
|
||||||
@ -207,12 +207,14 @@ Describe "Tests for scp command" -Tags "CI" {
|
|||||||
$tI++
|
$tI++
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|
||||||
It 'File copy: <Title> ' -TestCases:$testData {
|
It 'File copy: <Title> ' -TestCases:$testData {
|
||||||
param([string]$Title, $Source, $Destination, [string]$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
|
||||||
#validate file content. DestPath is the path to the file.
|
#validate file content. DestPath is the path to the file.
|
||||||
CheckTarget -target $DestinationFilePath | Should Be $true
|
CheckTarget -target $DestinationFilePath | Should Be $true
|
||||||
|
|
||||||
$equal = @(Compare-Object (Get-ChildItem -path $SourceFilePath) (Get-ChildItem -path $DestinationFilePath) -Property Name, Length ).Length -eq 0
|
$equal = @(Compare-Object (Get-ChildItem -path $SourceFilePath) (Get-ChildItem -path $DestinationFilePath) -Property Name, Length ).Length -eq 0
|
||||||
$equal | Should Be $true
|
$equal | Should Be $true
|
||||||
|
|
||||||
@ -239,10 +241,6 @@ Describe "Tests for scp command" -Tags "CI" {
|
|||||||
$equal | Should Be $true
|
$equal | Should Be $true
|
||||||
}
|
}
|
||||||
|
|
||||||
write-host "source dir:"
|
|
||||||
Get-ChildItem -Recurse -path $SourceDir | write-host
|
|
||||||
write-host "destination dir:"
|
|
||||||
Get-ChildItem -Recurse -path (join-path $DestinationDir $SourceDirName) | write-host
|
|
||||||
$equal = @(Compare-Object (Get-ChildItem -Recurse -path $SourceDir) (Get-ChildItem -Recurse -path (join-path $DestinationDir $SourceDirName) ) -Property Name, Length).Length -eq 0
|
$equal = @(Compare-Object (Get-ChildItem -Recurse -path $SourceDir) (Get-ChildItem -Recurse -path (join-path $DestinationDir $SourceDirName) ) -Property Name, Length).Length -eq 0
|
||||||
$equal | Should Be $true
|
$equal | Should Be $true
|
||||||
|
|
||||||
|
Loading…
x
Reference in New Issue
Block a user