Skip to content

Commit 87b28ce

Browse files
committed
Fix integ test
1 parent 903ceee commit 87b28ce

File tree

2 files changed

+18
-1
lines changed

2 files changed

+18
-1
lines changed

tests/Integration/Resources/DSC_SqlRSSetup.Integration.Tests.ps1

Lines changed: 8 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -210,6 +210,14 @@ Describe "$($script:dscResourceName)_Integration" -Tag @('Integration_SQL2017',
210210

211211
$resourceCurrentState.ProductVersion | Should -BeGreaterThan ([System.Version] '16.0.0.0')
212212
}
213+
214+
if (Test-ContinuousIntegrationTaskCategory -Category 'Integration_PowerBI')
215+
{
216+
## Uncomment this line to see the registry key values.
217+
#Write-Verbose -Message ((reg query "HKLM\SOFTWARE\Microsoft\Microsoft SQL Server" /s) | Out-String) -Verbose
218+
219+
$resourceCurrentState.ProductVersion | Should -BeGreaterThan ([System.Version] '15.0.0.0')
220+
}
213221
}
214222

215223
It 'Should return $true when Test-DscConfiguration is run' {

tests/Integration/Resources/DSC_SqlRSSetup.config.ps1

Lines changed: 10 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -103,9 +103,18 @@ Configuration DSC_SqlRSSetup_StopReportingServicesInstance_Config
103103
{
104104
Import-DscResource -ModuleName 'xPSDesiredStateConfiguration' -ModuleVersion '9.1.0'
105105

106+
$serviceConfigName = if (Test-ContinuousIntegrationTaskCategory -Category 'Integration_PowerBI')
107+
{
108+
'StopPowerBIReportServerInstance'
109+
}
110+
else
111+
{
112+
'StopReportingServicesInstance'
113+
}
114+
106115
node $AllNodes.NodeName
107116
{
108-
xService 'StopReportingServicesInstance'
117+
xService $serviceConfigName
109118
{
110119
Name = if (Test-ContinuousIntegrationTaskCategory -Category 'Integration_PowerBI')
111120
{

0 commit comments

Comments
 (0)