Skip to content

Commit d01aa49

Browse files
committed
Fix enums logic
1 parent 28f8778 commit d01aa49

File tree

2 files changed

+6
-2
lines changed

2 files changed

+6
-2
lines changed

source/Classes/020.SqlRSSetup.ps1

Lines changed: 2 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -233,6 +233,8 @@ class SqlRSSetup : ResourceBase
233233
'ForceRestart'
234234
'VersionUpgrade'
235235
)
236+
237+
$this.FeatureOptionalEnums = $true
236238
}
237239

238240
[SqlRSSetup] Get()

tests/Unit/Classes/SqlRSSetup.Tests.ps1

Lines changed: 4 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -123,12 +123,14 @@ Describe 'SqlRSSetup\Get()' -Tag 'Get' {
123123

124124
$currentState.InstanceName | Should -Be 'SSRS'
125125
$currentState.Timeout | Should -Be 7200
126-
$currentState.Action | Should -BeNullOrEmpty
126+
# Returns 0, that means no value was set by GetCurrentState() from the enum InstallAction
127+
$currentState.Action | Should -Be 0
127128
$currentState.AcceptLicensingTerms | Should -BeFalse
128129
$currentState.MediaPath | Should -BeNullOrEmpty
129130
$currentState.ProductKey | Should -BeNullOrEmpty
130131
$currentState.EditionUpgrade | Should -BeNullOrEmpty
131-
$currentState.Edition | Should -BeNullOrEmpty
132+
# Returns 0, that means no value was set by GetCurrentState() from the enum ReportServerEdition
133+
$currentState.Edition | Should -Be 0
132134
$currentState.LogPath | Should -BeNullOrEmpty
133135
$currentState.InstallFolder | Should -BeNullOrEmpty
134136
$currentState.SuppressRestart | Should -BeFalse

0 commit comments

Comments
 (0)