Skip to content

Commit d3efc4d

Browse files
committed
Fix integ test
1 parent dfd8a46 commit d3efc4d

7 files changed

+16
-14
lines changed

source/Private/Invoke-ReportServerSetupAction.ps1

Lines changed: 8 additions & 6 deletions
Original file line numberDiff line numberDiff line change
@@ -147,7 +147,7 @@ function Invoke-ReportServerSetupAction
147147

148148
[Parameter(ParameterSetName = 'Install')]
149149
[Parameter(ParameterSetName = 'Repair')]
150-
[ValidateSet('Development', 'Evaluation', 'ExpressAdvanced')]
150+
[ValidateSet('Developer', 'Evaluation', 'ExpressAdvanced')]
151151
[System.String]
152152
$Edition,
153153

@@ -213,6 +213,9 @@ function Invoke-ReportServerSetupAction
213213

214214
Assert-BoundParameter @assertBoundParameters
215215

216+
# Sensitive values.
217+
$sensitiveValue = @()
218+
216219
# Default action is install or upgrade.
217220
$setupArgument = '/quiet /IAcceptLicenseTerms'
218221

@@ -228,6 +231,10 @@ function Invoke-ReportServerSetupAction
228231
if ($ProductKey)
229232
{
230233
$setupArgument += ' /PID={0}' -f $ProductKey
234+
235+
$sensitiveValue += @(
236+
$ProductKey
237+
)
231238
}
232239

233240
if ($EditionUpgrade.IsPresent)
@@ -263,11 +270,6 @@ function Invoke-ReportServerSetupAction
263270

264271
$verboseSetupArgument = $setupArgument
265272

266-
# Sensitive values.
267-
$sensitiveValue = @(
268-
$ProductKey
269-
)
270-
271273
# Obfuscate sensitive values.
272274
foreach ($currentSensitiveValue in $sensitiveValue)
273275
{

source/Public/Install-SqlDscBIReportServer.ps1

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -96,7 +96,7 @@ function Install-SqlDscBIReportServer
9696
$EditionUpgrade,
9797

9898
[Parameter()]
99-
[ValidateSet('Development', 'Evaluation', 'ExpressAdvanced')]
99+
[ValidateSet('Developer', 'Evaluation', 'ExpressAdvanced')]
100100
[System.String]
101101
$Edition,
102102

source/Public/Install-SqlDscReportingService.ps1

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -98,7 +98,7 @@ function Install-SqlDscReportingService
9898
$EditionUpgrade,
9999

100100
[Parameter()]
101-
[ValidateSet('Development', 'Evaluation', 'ExpressAdvanced')]
101+
[ValidateSet('Developer', 'Evaluation', 'ExpressAdvanced')]
102102
[System.String]
103103
$Edition,
104104

source/Public/Repair-SqlDscBIReportServer.ps1

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -92,7 +92,7 @@ function Repair-SqlDscBIReportServer
9292
$EditionUpgrade,
9393

9494
[Parameter()]
95-
[ValidateSet('Development', 'Evaluation', 'ExpressAdvanced')]
95+
[ValidateSet('Developer', 'Evaluation', 'ExpressAdvanced')]
9696
[System.String]
9797
$Edition,
9898

source/Public/Repair-SqlDscReportingService.ps1

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -94,7 +94,7 @@ function Repair-SqlDscReportingService
9494
$EditionUpgrade,
9595

9696
[Parameter()]
97-
[ValidateSet('Development', 'Evaluation', 'ExpressAdvanced')]
97+
[ValidateSet('Developer', 'Evaluation', 'ExpressAdvanced')]
9898
[System.String]
9999
$Edition,
100100

tests/Integration/Commands/Install-SqlDscBIReportServer.Integration.Tests.ps1

Lines changed: 3 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -47,21 +47,21 @@ Describe 'Install-SqlDscBIReportServer' -Tag @('Integration_SQL2016', 'Integrati
4747
Force = $true
4848
}
4949

50-
Install-SqlDscBIReportServer @installSqlDscBIReportServerParameters
50+
Install-SqlDscBIReportServer @installSqlDscBIReportServerParameters -ErrorAction 'Stop'
5151
} | Should -Not -Throw
5252
}
5353

5454
It 'Should have installed Power BI Report Server' {
5555
# Validate the Power BI Report Server installation
56-
$reportServerService = Get-Service -Name 'PBIReportServer'
56+
$reportServerService = Get-Service -Name 'PowerBIReportServer'
5757

5858
$reportServerService | Should -Not -BeNullOrEmpty
5959
$reportServerService.Status | Should -Be 'Running'
6060
}
6161

6262
It 'Should stop the Power BI Report Server service' {
6363
# Stop the Power BI Report Server service to save memory on the build worker
64-
$stopServiceResult = Stop-Service -Name 'PBIReportServer' -Force -PassThru -Verbose -ErrorAction 'Stop'
64+
$stopServiceResult = Stop-Service -Name 'PowerBIReportServer' -Force -PassThru -Verbose -ErrorAction 'Stop'
6565

6666
write-verbose -Message ($stopServiceResult | Out-String) -Verbose
6767

tests/Integration/Commands/Install-SqlDscReportingService.Integration.Tests.ps1

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -47,7 +47,7 @@ Describe 'Install-SqlDscReportingService' -Tag @('Integration_SQL2022') {
4747
Force = $true
4848
}
4949

50-
Install-SqlDscReportingService @installSqlDscReportingServicesParameters
50+
Install-SqlDscReportingService @installSqlDscReportingServicesParameters -ErrorAction 'Stop'
5151
} | Should -Not -Throw
5252
}
5353

0 commit comments

Comments
 (0)