@@ -69,26 +69,28 @@ Describe 'Get-SqlDscRSDatabaseInstallation' {
6969 InstanceName = ' SSRS'
7070 }
7171
72+ # The CIM method returns GUIDs without braces
7273 Mock - CommandName Invoke-RsCimMethod - MockWith {
7374 return @ {
74- Length = 2
75- InstallationIDs = @ (' GUID1 ' , ' GUID2 ' )
75+ Length = 2
76+ InstallationIDs = @ (' c59fadae-f8ee-46ee-b063-f8d89872100c ' , ' a1b2c3d4-e5f6-7890-abcd-ef1234567890 ' )
7677 MachineNames = @ (' SERVER1' , ' SERVER2' )
7778 InstanceNames = @ (' SSRS' , ' SSRS' )
7879 IsInitialized = @ ($true , $true )
7980 }
8081 }
8182 }
8283
83- It ' Should return installation objects' {
84+ It ' Should return installation objects with GUIDs without braces ' {
8485 $result = $mockCimInstance | Get-SqlDscRSDatabaseInstallation
8586
8687 $result | Should -Not - BeNullOrEmpty
8788 $result | Should - HaveCount 2
88- $result [0 ].InstallationID | Should - Be ' GUID1 '
89+ $result [0 ].InstallationID | Should - Be ' c59fadae-f8ee-46ee-b063-f8d89872100c '
8990 $result [0 ].MachineName | Should - Be ' SERVER1'
9091 $result [0 ].InstanceName | Should - Be ' SSRS'
9192 $result [0 ].IsInitialized | Should - BeTrue
93+ $result [1 ].InstallationID | Should - Be ' a1b2c3d4-e5f6-7890-abcd-ef1234567890'
9294
9395 Should - Invoke - CommandName Invoke-RsCimMethod - ParameterFilter {
9496 $MethodName -eq ' ListReportServersInDatabase'
@@ -144,10 +146,11 @@ Describe 'Get-SqlDscRSDatabaseInstallation' {
144146 InstanceName = ' SSRS'
145147 }
146148
149+ # The CIM method returns GUIDs without braces
147150 Mock - CommandName Invoke-RsCimMethod - MockWith {
148151 return @ {
149152 Length = 1
150- InstallationIDs = @ (' GUID1 ' )
153+ InstallationIDs = @ (' d4e5f6a7-b8c9-0123-4567-890abcdef012 ' )
151154 MachineNames = @ (' SERVER1' )
152155 InstanceNames = @ (' SSRS' )
153156 IsInitialized = @ ($true )
@@ -160,6 +163,7 @@ Describe 'Get-SqlDscRSDatabaseInstallation' {
160163
161164 $result | Should -Not - BeNullOrEmpty
162165 $result | Should - HaveCount 1
166+ $result.InstallationID | Should - Be ' d4e5f6a7-b8c9-0123-4567-890abcdef012'
163167
164168 Should - Invoke - CommandName Invoke-RsCimMethod - Exactly - Times 1
165169 }
0 commit comments