Skip to content

Commit bbe7cbf

Browse files
committed
debug code
1 parent 5336421 commit bbe7cbf

File tree

2 files changed

+18
-0
lines changed

2 files changed

+18
-0
lines changed

source/Public/Get-SqlDscRSSetupConfiguration.ps1

Lines changed: 8 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -163,21 +163,29 @@ function Get-SqlDscRSSetupConfiguration
163163

164164
if (-not [System.String]::IsNullOrEmpty($returnObject.CurrentVersion))
165165
{
166+
Write-Verbose -Message 'DEBUG1' -Verbose
166167
$reportServerCurrentVersion = [System.Version] $returnObject.CurrentVersion
168+
Write-Verbose -Message 'DEBUG2' -Verbose
167169

168170
# Get values from MSReportServer_Instance
169171
$msReportServerInstance = Get-CimInstance -Namespace ('root\Microsoft\SqlServer\ReportServer\RS_{0}\v{1}' -f $instance.InstanceName, $reportServerCurrentVersion.Major) -ClassName 'MSReportServer_Instance' -ErrorAction 'SilentlyContinue'
170172

173+
Write-Verbose -Message ($msReportServerInstance | Out-String) -Verbose
174+
171175
if ($msReportServerInstance)
172176
{
177+
Write-Verbose -Message 'DEBUG3' -Verbose
173178
$returnObject.EditionID = $msReportServerInstance.EditionID
174179
$returnObject.EditionName = $msReportServerInstance.EditionName
175180
$returnObject.IsSharePointIntegrated = $msReportServerInstance.IsSharePointIntegrated
176181
$returnObject.MSReportServerInstanceVersion = $msReportServerInstance.Version
177182
$returnObject.InstanceId = $msReportServerInstance.InstanceId
183+
Write-Verbose -Message 'DEBUG4' -Verbose
178184
}
179185
}
180186

187+
Write-Verbose -Message ($returnObject | Out-String) -Verbose
188+
181189
$reportingServicesInstances += $returnObject
182190
}
183191

tests/Integration/Commands/Get-SqlDscRSSetupConfiguration.Integration.Tests.ps1

Lines changed: 10 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -31,6 +31,9 @@ Describe 'Get-SqlDscRSSetupConfiguration' {
3131
# Get the SSRS configuration
3232
$result = Get-SqlDscRSSetupConfiguration -InstanceName 'SSRS'
3333

34+
Write-Verbose -Message 'INTEG TEST DEBUG1' -Verbose
35+
Write-Verbose -Message ($result | Out-String) -Verbose
36+
3437
# Verify the result
3538
$result | Should -Not -BeNullOrEmpty
3639
$result.InstanceName | Should -Be 'SSRS'
@@ -47,7 +50,9 @@ Describe 'Get-SqlDscRSSetupConfiguration' {
4750
$result.EditionID | Should -Be 2176971986
4851
$result.EditionName | Should -Be 'SQL Server Developer'
4952
$result.IsSharePointIntegrated | Should -BeFalse
53+
Write-Verbose -Message 'INTEG TEST DEBUG2' -Verbose
5054
[System.Version] $result.MSReportServerInstanceVersion | Should -BeGreaterOrEqual ([System.Version] '14.0.601.20')
55+
Write-Verbose -Message 'INTEG TEST DEBUG3' -Verbose
5156
}
5257
}
5358

@@ -58,6 +63,9 @@ Describe 'Get-SqlDscRSSetupConfiguration' {
5863
# Get the SSRS configuration
5964
$result = Get-SqlDscRSSetupConfiguration -InstanceName 'SSRS'
6065

66+
Write-Verbose -Message 'INTEG TEST DEBUG1' -Verbose
67+
Write-Verbose -Message ($result | Out-String) -Verbose
68+
6169
# Verify the result
6270
$result | Should -Not -BeNullOrEmpty
6371
$result.InstanceName | Should -Be 'SSRS'
@@ -74,7 +82,9 @@ Describe 'Get-SqlDscRSSetupConfiguration' {
7482
$result.EditionID | Should -Be 2176971986
7583
$result.EditionName | Should -Be 'SQL Server Developer'
7684
$result.IsSharePointIntegrated | Should -BeFalse
85+
Write-Verbose -Message 'INTEG TEST DEBUG2' -Verbose
7786
[System.Version] $result.MSReportServerInstanceVersion | Should -BeGreaterOrEqual ([System.Version] '15.0.1103.41')
87+
Write-Verbose -Message 'INTEG TEST DEBUG3' -Verbose
7888
}
7989
}
8090

0 commit comments

Comments
 (0)