Skip to content

Commit

Permalink
Merge pull request #73 from sdl/bugfix/819-Fix-test-before-release
Browse files Browse the repository at this point in the history
#4 [819-Fix-test-before-release] Fix temp folder path, fix ishsettings count
  • Loading branch information
HildeVermeiren authored Dec 4, 2019
2 parents ba128cb + 8ca5740 commit 89aede5
Show file tree
Hide file tree
Showing 2 changed files with 16 additions and 5 deletions.
Original file line number Diff line number Diff line change
Expand Up @@ -34,7 +34,8 @@ try {

Describe New-IshObfuscatedFile" -Tags "Read" {
Write-Host "Initializing Test Data and Variables"
$rootFolder = Join-Path -Path $env:TEMP -ChildPath $cmdletName
$tempFolder = [System.IO.Path]::GetTempPath()
$rootFolder = Join-Path -Path $tempFolder -ChildPath $cmdletName
New-Item -ItemType Directory -Path $rootFolder
$inputFolder = Join-Path -Path $rootFolder -ChildPath "input"
New-Item -ItemType Directory -Path $inputFolder
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -82,8 +82,13 @@ Describe “Get-IshSetting" -Tags "Read" {
$ishFields = Get-IshSetting -IshSession $ishSession -RequestedMetadata $requestedMetadata
$ishSession.DefaultRequestedMetadata = $oldDefaultRequestedMetadata
$ishFields.GetType().Name | Should BeExactly "Object[]"
if ((Get-IshVersion).MajorVersion -le 13) { $ishFields.Length | Should Be 19 }
if ((Get-IshVersion).MajorVersion -ge 14) { $ishFields.Length | Should Be 22 } # 14.0.0, fields FISHCOLLECTIVESPACESCFG, FISHPREVIEWRESOLUTION(value), FISHPREVIEWRESOLUTION(element) were added
$ishVersion = Get-IshVersion
$expectedIshFieldsLength = 0
if($ishVersion.MajorVersion -le 13) { $expectedIshFieldsLength = 19 }
if($ishVersion.MajorVersion -eq 14 -and $ishVersion.RevisionVersion -eq 0) { $expectedIshFieldsLength = 22 } # 14.0.0, fields FISHCOLLECTIVESPACESCFG, FISHPREVIEWRESOLUTION(value), FISHPREVIEWRESOLUTION(element) were added
if($ishVersion.MajorVersion -eq 14 -and $ishVersion.RevisionVersion -ge 1) { $expectedIshFieldsLength = 23 } # 14.0.1, field FISHANNOTATIONSTATECONFG was added
if($ishVersion.MajorVersion -gt 14) { $expectedIshFieldsLength = 23 }
$ishFields.Length | Should Be $expectedIshFieldsLength
(Get-IshMetadataField -IshSession $ishSession -IshField $ishFields -Name "NAME" -Level None) | Should Be "Configuration card"
}
It "Parameter IshSession.DefaultRequestedMetadata=All" {
Expand All @@ -92,8 +97,13 @@ Describe “Get-IshSetting" -Tags "Read" {
$ishFields = Get-IshSetting -IshSession $ishSession -RequestedMetadata $requestedMetadata
$ishSession.DefaultRequestedMetadata = $oldDefaultRequestedMetadata
$ishFields.GetType().Name | Should BeExactly "Object[]"
if ((Get-IshVersion).MajorVersion -le 13) { $ishFields.Length | Should Be 31 }
if ((Get-IshVersion).MajorVersion -ge 14) { $ishFields.Length | Should Be 34 } # 14.0.0, fields FISHCOLLECTIVESPACESCFG, FISHPREVIEWRESOLUTION(value), FISHPREVIEWRESOLUTION(element) were added
$ishVersion = Get-IshVersion
$expectedIshFieldsLength = 0
if($ishVersion.MajorVersion -le 13) { $expectedIshFieldsLength = 31 }
if($ishVersion.MajorVersion -eq 14 -and $ishVersion.RevisionVersion -eq 0) { $expectedIshFieldsLength = 34 } # 14.0.0, fields FISHCOLLECTIVESPACESCFG, FISHPREVIEWRESOLUTION(value), FISHPREVIEWRESOLUTION(element) were added
if($ishVersion.MajorVersion -eq 14 -and $ishVersion.RevisionVersion -ge 1) { $expectedIshFieldsLength = 35 } # 14.0.1, field FISHANNOTATIONSTATECONFG was added
if($ishVersion.MajorVersion -gt 14) { $expectedIshFieldsLength = 35 }
$ishFields.Length | Should Be $expectedIshFieldsLength
(Get-IshMetadataField -IshSession $ishSession -IshField $ishFields -Name "NAME" -Level None) | Should Be "Configuration card"
}
}
Expand Down

0 comments on commit 89aede5

Please sign in to comment.