Skip to content

Commit

Permalink
Fix test as requested
Browse files Browse the repository at this point in the history
  • Loading branch information
Matteo Marenghi committed Aug 12, 2019
1 parent 6538d13 commit b821413
Showing 1 changed file with 7 additions and 4 deletions.
11 changes: 7 additions & 4 deletions Tests/Pester.Commands.Cmdlets.Archive.Tests.ps1
Original file line number Diff line number Diff line change
Expand Up @@ -767,10 +767,13 @@ Describe "Test suite for Microsoft.PowerShell.Archive module" -Tags "BVT" {
Get-Content $sourcePath
$TestFile = [System.IO.File]::Open($sourcePath, 'Open', 'Read', 'Read')

Compress-Archive -Path $sourcePath -DestinationPath $destinationPath
Test-Path $destinationPath | Should Be $true

$TestFile.Close()
try {
Compress-Archive -Path $sourcePath -DestinationPath $destinationPath
Test-Path $destinationPath | Should Be $true
}
finally {
$TestFile.Close()
}
}
}

Expand Down

0 comments on commit b821413

Please sign in to comment.