change check of OS version in scp test

This commit is contained in:
Tess Gauthier 2022-11-02 10:48:59 -04:00
parent 59a1c22f5e
commit 99afa05d10
1 changed files with 1 additions and 1 deletions

View File

@ -180,7 +180,7 @@ Describe "Tests for scp command" -Tags "CI" {
$equal = @(Compare-Object (Get-ChildItem -path $SourceFilePath) (Get-ChildItem -path $DestinationFilePath) -Property Name, Length ).Length -eq 0
$equal | Should Be $true
if($Options.contains("-p ") -and [System.Convert]::ToInt32((Get-WMIObject win32_operatingsystem).Version.Split(".")[0]) -ge 10)
if($Options.contains("-p ") -and [environment]::OSVersion.Version.Major -ge 10)
{
$equal = @(Compare-Object (Get-ChildItem -path $SourceFilePath).LastWriteTime.DateTime (Get-ChildItem -path $DestinationFilePath).LastWriteTime.DateTime ).Length -eq 0
$equal | Should Be $true