diff --git a/CHANGELOG.md b/CHANGELOG.md index 4bbb4a02e1..37af2ea9be 100644 --- a/CHANGELOG.md +++ b/CHANGELOG.md @@ -24,6 +24,10 @@ and this project adheres to [Semantic Versioning](https://semver.org/spec/v2.0.0 ### Changed +- Renamed commands `*-SqlDscBIReportServer` to `*-SqlDscPowerBIReportServer` for + clarity. The old names `*-SqlDscBIReportServer` and `*-SqlDscPBIReportServer` + are available as aliases for backward compatibility + ([issue #2071](https://github.com/dsccommunity/SqlServerDsc/issues/2071)). - `SqlPermission` - Refactored to use the new object-based server permission commands (`Grant-SqlDscServerPermission`, `Deny-SqlDscServerPermission`, diff --git a/azure-pipelines.yml b/azure-pipelines.yml index 396264e535..bb4bb050ec 100644 --- a/azure-pipelines.yml +++ b/azure-pipelines.yml @@ -587,15 +587,15 @@ stages: 'tests/Integration/Commands/Save-SqlDscSqlServerMediaFile.Integration.Tests.ps1' 'tests/Integration/Commands/Import-SqlDscPreferredModule.Integration.Tests.ps1' # Group 1 - 'tests/Integration/Commands/Install-SqlDscBIReportServer.Integration.Tests.ps1' + 'tests/Integration/Commands/Install-SqlDscPowerBIReportServer.Integration.Tests.ps1' # Group 2 'tests/Integration/Commands/Get-SqlDscInstalledInstance.Integration.Tests.ps1' 'tests/Integration/Commands/Get-SqlDscRSSetupConfiguration.Integration.Tests.ps1' 'tests/Integration/Commands/Test-SqlDscRSInstalled.Integration.Tests.ps1' # Group 8 - 'tests/Integration/Commands/Repair-SqlDscBIReportServer.Integration.Tests.ps1' + 'tests/Integration/Commands/Repair-SqlDscPowerBIReportServer.Integration.Tests.ps1' # Group 9 - 'tests/Integration/Commands/Uninstall-SqlDscBIReportServer.Integration.Tests.ps1' + 'tests/Integration/Commands/Uninstall-SqlDscPowerBIReportServer.Integration.Tests.ps1' ) name: test displayName: 'Run Integration Test' diff --git a/source/Classes/020.SqlRSSetup.ps1 b/source/Classes/020.SqlRSSetup.ps1 index 24190e59ea..9a03c0449f 100644 --- a/source/Classes/020.SqlRSSetup.ps1 +++ b/source/Classes/020.SqlRSSetup.ps1 @@ -474,7 +474,7 @@ class SqlRSSetup : ResourceBase { Write-Verbose -Message $this.localizedData.Installing_PowerBIReportServer - $exitCode = Install-SqlDscBIReportServer @commandParameters -PassThru -Force -ErrorAction 'Stop' + $exitCode = Install-SqlDscPowerBIReportServer @commandParameters -PassThru -Force -ErrorAction 'Stop' break } @@ -483,7 +483,7 @@ class SqlRSSetup : ResourceBase { Write-Verbose -Message $this.localizedData.Repairing_PowerBIReportServer - $exitCode = Repair-SqlDscBIReportServer @commandParameters -PassThru -Force -ErrorAction 'Stop' + $exitCode = Repair-SqlDscPowerBIReportServer @commandParameters -PassThru -Force -ErrorAction 'Stop' break } @@ -492,7 +492,7 @@ class SqlRSSetup : ResourceBase { Write-Verbose -Message $this.localizedData.Uninstalling_PowerBIReportServer - $exitCode = Uninstall-SqlDscBIReportServer @commandParameters -PassThru -Force -ErrorAction 'Stop' + $exitCode = Uninstall-SqlDscPowerBIReportServer @commandParameters -PassThru -Force -ErrorAction 'Stop' break } diff --git a/source/Public/Install-SqlDscBIReportServer.ps1 b/source/Public/Install-SqlDscPowerBIReportServer.ps1 similarity index 84% rename from source/Public/Install-SqlDscBIReportServer.ps1 rename to source/Public/Install-SqlDscPowerBIReportServer.ps1 index 96bfe4d948..1a22ec0a78 100644 --- a/source/Public/Install-SqlDscBIReportServer.ps1 +++ b/source/Public/Install-SqlDscPowerBIReportServer.ps1 @@ -71,33 +71,34 @@ No output is generated when PassThru is not specified. .EXAMPLE - Install-SqlDscBIReportServer -AcceptLicensingTerms -MediaPath 'E:\PowerBIReportServer.exe' + Install-SqlDscPowerBIReportServer -AcceptLicensingTerms -MediaPath 'E:\PowerBIReportServer.exe' Installs Power BI Report Server with default settings. .EXAMPLE - Install-SqlDscBIReportServer -AcceptLicensingTerms -MediaPath 'E:\PowerBIReportServer.exe' -ProductKey '12345-12345-12345-12345-12345' + Install-SqlDscPowerBIReportServer -AcceptLicensingTerms -MediaPath 'E:\PowerBIReportServer.exe' -ProductKey '12345-12345-12345-12345-12345' Installs Power BI Report Server using a product key. .EXAMPLE - Install-SqlDscBIReportServer -AcceptLicensingTerms -MediaPath 'E:\PowerBIReportServer.exe' -Edition 'Evaluation' -InstallFolder 'C:\Program Files\Power BI Report Server' + Install-SqlDscPowerBIReportServer -AcceptLicensingTerms -MediaPath 'E:\PowerBIReportServer.exe' -Edition 'Evaluation' -InstallFolder 'C:\Program Files\Power BI Report Server' Installs Power BI Report Server in evaluation edition to a custom folder. .EXAMPLE - Install-SqlDscBIReportServer -AcceptLicensingTerms -MediaPath 'E:\PowerBIReportServer.exe' -ProductKey '12345-12345-12345-12345-12345' -EditionUpgrade -LogPath 'C:\Logs\PowerBIReportServer_Install.log' + Install-SqlDscPowerBIReportServer -AcceptLicensingTerms -MediaPath 'E:\PowerBIReportServer.exe' -ProductKey '12345-12345-12345-12345-12345' -EditionUpgrade -LogPath 'C:\Logs\PowerBIReportServer_Install.log' Installs Power BI Report Server and upgrades the edition using a product key. Also specifies a custom log path. .EXAMPLE - $exitCode = Install-SqlDscBIReportServer -AcceptLicensingTerms -MediaPath 'E:\PowerBIReportServer.exe' -PassThru + $exitCode = Install-SqlDscPowerBIReportServer -AcceptLicensingTerms -MediaPath 'E:\PowerBIReportServer.exe' -PassThru Installs Power BI Report Server with default settings and returns the setup exit code. #> -function Install-SqlDscBIReportServer +function Install-SqlDscPowerBIReportServer { [System.Diagnostics.CodeAnalysis.SuppressMessageAttribute('PSShouldProcess', '', Justification = 'Because ShouldProcess is used in Invoke-SetupAction')] + [Alias('Install-SqlDscBIReportServer', 'Install-SqlDscPBIReportServer')] [CmdletBinding(SupportsShouldProcess = $true, ConfirmImpact = 'High')] [OutputType([System.Int32])] param diff --git a/source/Public/Repair-SqlDscBIReportServer.ps1 b/source/Public/Repair-SqlDscPowerBIReportServer.ps1 similarity index 86% rename from source/Public/Repair-SqlDscBIReportServer.ps1 rename to source/Public/Repair-SqlDscPowerBIReportServer.ps1 index 2829fcf880..a76c8bccf8 100644 --- a/source/Public/Repair-SqlDscBIReportServer.ps1 +++ b/source/Public/Repair-SqlDscPowerBIReportServer.ps1 @@ -66,29 +66,30 @@ code as System.Int32. .EXAMPLE - Repair-SqlDscBIReportServer -AcceptLicensingTerms -MediaPath 'E:\PowerBIReportServer.exe' + Repair-SqlDscPowerBIReportServer -AcceptLicensingTerms -MediaPath 'E:\PowerBIReportServer.exe' Repairs Power BI Report Server with default settings. .EXAMPLE - Repair-SqlDscBIReportServer -AcceptLicensingTerms -MediaPath 'E:\PowerBIReportServer.exe' -ProductKey '12345-12345-12345-12345-12345' -EditionUpgrade + Repair-SqlDscPowerBIReportServer -AcceptLicensingTerms -MediaPath 'E:\PowerBIReportServer.exe' -ProductKey '12345-12345-12345-12345-12345' -EditionUpgrade Repairs Power BI Report Server and upgrades the edition using a product key. .EXAMPLE - Repair-SqlDscBIReportServer -AcceptLicensingTerms -MediaPath 'E:\PowerBIReportServer.exe' -LogPath 'C:\Logs\PowerBIReportServer_Repair.log' + Repair-SqlDscPowerBIReportServer -AcceptLicensingTerms -MediaPath 'E:\PowerBIReportServer.exe' -LogPath 'C:\Logs\PowerBIReportServer_Repair.log' Repairs Power BI Report Server and specifies a custom log path. .EXAMPLE - $exitCode = Repair-SqlDscBIReportServer -AcceptLicensingTerms -MediaPath 'E:\PowerBIReportServer.exe' -PassThru + $exitCode = Repair-SqlDscPowerBIReportServer -AcceptLicensingTerms -MediaPath 'E:\PowerBIReportServer.exe' -PassThru Repairs Power BI Report Server with default settings and returns the setup exit code. #> -function Repair-SqlDscBIReportServer +function Repair-SqlDscPowerBIReportServer { [System.Diagnostics.CodeAnalysis.SuppressMessageAttribute('PSShouldProcess', '', Justification = 'Because ShouldProcess is used in Invoke-SetupAction')] + [Alias('Repair-SqlDscBIReportServer', 'Repair-SqlDscPBIReportServer')] [CmdletBinding(SupportsShouldProcess = $true, ConfirmImpact = 'High')] [OutputType([System.Int32])] param diff --git a/source/Public/Uninstall-SqlDscBIReportServer.ps1 b/source/Public/Uninstall-SqlDscPowerBIReportServer.ps1 similarity index 83% rename from source/Public/Uninstall-SqlDscBIReportServer.ps1 rename to source/Public/Uninstall-SqlDscPowerBIReportServer.ps1 index aa42fdf150..49a8d8c760 100644 --- a/source/Public/Uninstall-SqlDscBIReportServer.ps1 +++ b/source/Public/Uninstall-SqlDscPowerBIReportServer.ps1 @@ -43,28 +43,29 @@ No output when PassThru is not specified. .EXAMPLE - Uninstall-SqlDscBIReportServer -MediaPath 'E:\PowerBIReportServer.exe' + Uninstall-SqlDscPowerBIReportServer -MediaPath 'E:\PowerBIReportServer.exe' Uninstalls Power BI Report Server. .EXAMPLE - Uninstall-SqlDscBIReportServer -MediaPath 'E:\PowerBIReportServer.exe' -LogPath 'C:\Logs\PowerBIReportServer_Uninstall.log' + Uninstall-SqlDscPowerBIReportServer -MediaPath 'E:\PowerBIReportServer.exe' -LogPath 'C:\Logs\PowerBIReportServer_Uninstall.log' Uninstalls Power BI Report Server and specifies a custom log path. .EXAMPLE - Uninstall-SqlDscBIReportServer -MediaPath 'E:\PowerBIReportServer.exe' -Force + Uninstall-SqlDscPowerBIReportServer -MediaPath 'E:\PowerBIReportServer.exe' -Force Uninstalls Power BI Report Server without prompting for confirmation. .EXAMPLE - $exitCode = Uninstall-SqlDscBIReportServer -MediaPath 'E:\PowerBIReportServer.exe' -PassThru + $exitCode = Uninstall-SqlDscPowerBIReportServer -MediaPath 'E:\PowerBIReportServer.exe' -PassThru Uninstalls Power BI Report Server and returns the setup exit code. #> -function Uninstall-SqlDscBIReportServer +function Uninstall-SqlDscPowerBIReportServer { [System.Diagnostics.CodeAnalysis.SuppressMessageAttribute('PSShouldProcess', '', Justification = 'Because ShouldProcess is used in Invoke-SetupAction')] + [Alias('Uninstall-SqlDscBIReportServer', 'Uninstall-SqlDscPBIReportServer')] [CmdletBinding(SupportsShouldProcess = $true, ConfirmImpact = 'High')] [OutputType([System.Int32])] param diff --git a/tests/Integration/Commands/Install-SqlDscBIReportServer.Integration.Tests.ps1 b/tests/Integration/Commands/Install-SqlDscPowerBIReportServer.Integration.Tests.ps1 similarity index 91% rename from tests/Integration/Commands/Install-SqlDscBIReportServer.Integration.Tests.ps1 rename to tests/Integration/Commands/Install-SqlDscPowerBIReportServer.Integration.Tests.ps1 index 82562bcb2b..6c23556bf1 100644 --- a/tests/Integration/Commands/Install-SqlDscBIReportServer.Integration.Tests.ps1 +++ b/tests/Integration/Commands/Install-SqlDscPowerBIReportServer.Integration.Tests.ps1 @@ -29,7 +29,7 @@ BeforeAll { Import-Module -Name $script:moduleName -Force -ErrorAction 'Stop' } -Describe 'Install-SqlDscBIReportServer' -Tag @('Integration_PowerBI') { +Describe 'Install-SqlDscPowerBIReportServer' -Tag @('Integration_PowerBI') { BeforeAll { Write-Verbose -Message ('Running integration test as user ''{0}''.' -f $env:UserName) -Verbose @@ -42,7 +42,7 @@ Describe 'Install-SqlDscBIReportServer' -Tag @('Integration_PowerBI') { Context 'When installing Power BI Report Server' { # cSpell: ignore PBIRS It 'Should run the command without throwing' { - # Set splatting parameters for Install-SqlDscBIReportServer + # Set splatting parameters for Install-SqlDscPowerBIReportServer $installSqlDscBIReportServerParameters = @{ AcceptLicensingTerms = $true MediaPath = $powerBIReportServerExecutable @@ -54,7 +54,7 @@ Describe 'Install-SqlDscBIReportServer' -Tag @('Integration_PowerBI') { Force = $true } - $null = Install-SqlDscBIReportServer @installSqlDscBIReportServerParameters -ErrorAction 'Stop' + $null = Install-SqlDscPowerBIReportServer @installSqlDscBIReportServerParameters -ErrorAction 'Stop' } It 'Should have installed Power BI Report Server' { diff --git a/tests/Integration/Commands/README.md b/tests/Integration/Commands/README.md index 224a6bfbde..e5ff39b00a 100644 --- a/tests/Integration/Commands/README.md +++ b/tests/Integration/Commands/README.md @@ -174,12 +174,12 @@ Command | Run order # | Depends on # | Use instance | Creates persistent objects Prerequisites | 0 | - | - | Sets up dependencies Save-SqlDscSqlServerMediaFile | 0 | - | - | Downloads SQL Server media files Import-SqlDscPreferredModule | 0 | - | - | - -Install-SqlDscBIReportServer | 1 | 0 (Prerequisites) | - | PBIRS instance -Get-SqlDscInstalledInstance | 2 | 1 (Install-SqlDscBIReportServer), 0 (Prerequisites) | PBIRS | - -Get-SqlDscRSSetupConfiguration | 2 | 1 (Install-SqlDscBIReportServer), 0 (Prerequisites) | PBIRS | - -Test-SqlDscRSInstalled | 2 | 1 (Install-SqlDscBIReportServer), 0 (Prerequisites) | PBIRS | - -Repair-SqlDscBIReportServer | 8 | 1 (Install-SqlDscBIReportServer) | PBIRS | - -Uninstall-SqlDscBIReportServer | 9 | 8 (Repair-SqlDscBIReportServer) | - | - +Install-SqlDscPowerBIReportServer | 1 | 0 (Prerequisites) | - | PBIRS instance +Get-SqlDscInstalledInstance | 2 | 1 (Install-SqlDscPowerBIReportServer), 0 (Prerequisites) | PBIRS | - +Get-SqlDscRSSetupConfiguration | 2 | 1 (Install-SqlDscPowerBIReportServer), 0 (Prerequisites) | PBIRS | - +Test-SqlDscRSInstalled | 2 | 1 (Install-SqlDscPowerBIReportServer), 0 (Prerequisites) | PBIRS | - +Repair-SqlDscPowerBIReportServer | 8 | 1 (Install-SqlDscPowerBIReportServer) | PBIRS | - +Uninstall-SqlDscPowerBIReportServer | 9 | 8 (Repair-SqlDscPowerBIReportServer) | - | - ## Integration Tests diff --git a/tests/Integration/Commands/Repair-SqlDscBIReportServer.Integration.Tests.ps1 b/tests/Integration/Commands/Repair-SqlDscPowerBIReportServer.Integration.Tests.ps1 similarity index 92% rename from tests/Integration/Commands/Repair-SqlDscBIReportServer.Integration.Tests.ps1 rename to tests/Integration/Commands/Repair-SqlDscPowerBIReportServer.Integration.Tests.ps1 index 69f87f63ca..8d0a55561a 100644 --- a/tests/Integration/Commands/Repair-SqlDscBIReportServer.Integration.Tests.ps1 +++ b/tests/Integration/Commands/Repair-SqlDscPowerBIReportServer.Integration.Tests.ps1 @@ -29,7 +29,7 @@ BeforeAll { Import-Module -Name $script:moduleName -Force -ErrorAction 'Stop' } -Describe 'Repair-SqlDscBIReportServer' -Tag @('Integration_PowerBI') { +Describe 'Repair-SqlDscPowerBIReportServer' -Tag @('Integration_PowerBI') { BeforeAll { Write-Verbose -Message ('Running integration test as user ''{0}''.' -f $env:UserName) -Verbose @@ -50,7 +50,7 @@ Describe 'Repair-SqlDscBIReportServer' -Tag @('Integration_PowerBI') { Context 'When repairing BI Report Server' { It 'Should run the command without throwing' { - # Set splatting parameters for Repair-SqlDscBIReportServer + # Set splatting parameters for Repair-SqlDscPowerBIReportServer $repairSqlDscBIReportServerParameters = @{ AcceptLicensingTerms = $true MediaPath = $powerBIReportServerExecutable @@ -61,7 +61,7 @@ Describe 'Repair-SqlDscBIReportServer' -Tag @('Integration_PowerBI') { Force = $true } - $null = Repair-SqlDscBIReportServer @repairSqlDscBIReportServerParameters + $null = Repair-SqlDscPowerBIReportServer @repairSqlDscBIReportServerParameters } It 'Should still have a Power BI Report Server service running after repair' { diff --git a/tests/Integration/Commands/Uninstall-SqlDscBIReportServer.Integration.Tests.ps1 b/tests/Integration/Commands/Uninstall-SqlDscPowerBIReportServer.Integration.Tests.ps1 similarity index 91% rename from tests/Integration/Commands/Uninstall-SqlDscBIReportServer.Integration.Tests.ps1 rename to tests/Integration/Commands/Uninstall-SqlDscPowerBIReportServer.Integration.Tests.ps1 index 7135552c56..c4bac2de62 100644 --- a/tests/Integration/Commands/Uninstall-SqlDscBIReportServer.Integration.Tests.ps1 +++ b/tests/Integration/Commands/Uninstall-SqlDscPowerBIReportServer.Integration.Tests.ps1 @@ -29,7 +29,7 @@ BeforeAll { Import-Module -Name $script:moduleName -Force -ErrorAction 'Stop' } -Describe 'Uninstall-SqlDscBIReportServer' -Tag @('Integration_PowerBI') { +Describe 'Uninstall-SqlDscPowerBIReportServer' -Tag @('Integration_PowerBI') { BeforeAll { Write-Verbose -Message ('Running integration test as user ''{0}''.' -f $env:UserName) -Verbose @@ -50,7 +50,7 @@ Describe 'Uninstall-SqlDscBIReportServer' -Tag @('Integration_PowerBI') { Context 'When uninstalling BI Report Server' { It 'Should run the command without throwing' { - # Set splatting parameters for Uninstall-SqlDscBIReportServer + # Set splatting parameters for Uninstall-SqlDscPowerBIReportServer $uninstallSqlDscBIReportServerParameters = @{ MediaPath = $powerBIReportServerExecutable LogPath = Join-Path -Path $script:temporaryFolder -ChildPath 'SSRS_Uninstall.log' @@ -60,7 +60,7 @@ Describe 'Uninstall-SqlDscBIReportServer' -Tag @('Integration_PowerBI') { Force = $true } - $null = Uninstall-SqlDscBIReportServer @uninstallSqlDscBIReportServerParameters + $null = Uninstall-SqlDscPowerBIReportServer @uninstallSqlDscBIReportServerParameters } It 'Should not have a Power BI Report Server service' { diff --git a/tests/Unit/Classes/SqlRSSetup.Tests.ps1 b/tests/Unit/Classes/SqlRSSetup.Tests.ps1 index 7eb1830785..abc9283d76 100644 --- a/tests/Unit/Classes/SqlRSSetup.Tests.ps1 +++ b/tests/Unit/Classes/SqlRSSetup.Tests.ps1 @@ -728,7 +728,7 @@ Describe 'SqlRSSetup\Modify()' -Tag 'Modify' { } } - Mock -CommandName Install-SqlDscBIReportServer -MockWith { + Mock -CommandName Install-SqlDscPowerBIReportServer -MockWith { return 0 } } @@ -744,7 +744,7 @@ Describe 'SqlRSSetup\Modify()' -Tag 'Modify' { } ) - Should -Invoke -CommandName 'Install-SqlDscBIReportServer' -Exactly -Times 1 -Scope It + Should -Invoke -CommandName 'Install-SqlDscPowerBIReportServer' -Exactly -Times 1 -Scope It } } } @@ -759,7 +759,7 @@ Describe 'SqlRSSetup\Modify()' -Tag 'Modify' { } } - Mock -CommandName Install-SqlDscBIReportServer -MockWith { + Mock -CommandName Install-SqlDscPowerBIReportServer -MockWith { return 3010 } @@ -777,7 +777,7 @@ Describe 'SqlRSSetup\Modify()' -Tag 'Modify' { } ) - Should -Invoke -CommandName 'Install-SqlDscBIReportServer' -Exactly -Times 1 -Scope It + Should -Invoke -CommandName 'Install-SqlDscPowerBIReportServer' -Exactly -Times 1 -Scope It Should -Invoke -CommandName 'Set-DscMachineRebootRequired' -Exactly -Times 1 -Scope It } @@ -866,7 +866,7 @@ Describe 'SqlRSSetup\Modify()' -Tag 'Modify' { } } - Mock -CommandName Uninstall-SqlDscBIReportServer -MockWith { + Mock -CommandName Uninstall-SqlDscPowerBIReportServer -MockWith { return 0 } } @@ -882,7 +882,7 @@ Describe 'SqlRSSetup\Modify()' -Tag 'Modify' { } ) - Should -Invoke -CommandName 'Uninstall-SqlDscBIReportServer' -Exactly -Times 1 -Scope It + Should -Invoke -CommandName 'Uninstall-SqlDscPowerBIReportServer' -Exactly -Times 1 -Scope It } } } @@ -897,7 +897,7 @@ Describe 'SqlRSSetup\Modify()' -Tag 'Modify' { } } - Mock -CommandName Uninstall-SqlDscBIReportServer -MockWith { + Mock -CommandName Uninstall-SqlDscPowerBIReportServer -MockWith { return 3010 } @@ -915,7 +915,7 @@ Describe 'SqlRSSetup\Modify()' -Tag 'Modify' { } ) - Should -Invoke -CommandName 'Uninstall-SqlDscBIReportServer' -Exactly -Times 1 -Scope It + Should -Invoke -CommandName 'Uninstall-SqlDscPowerBIReportServer' -Exactly -Times 1 -Scope It Should -Invoke -CommandName 'Set-DscMachineRebootRequired' -Exactly -Times 1 -Scope It } @@ -1004,7 +1004,7 @@ Describe 'SqlRSSetup\Modify()' -Tag 'Modify' { } } - Mock -CommandName Repair-SqlDscBIReportServer -MockWith { + Mock -CommandName Repair-SqlDscPowerBIReportServer -MockWith { return 0 } } @@ -1020,7 +1020,7 @@ Describe 'SqlRSSetup\Modify()' -Tag 'Modify' { } ) - Should -Invoke -CommandName 'Repair-SqlDscBIReportServer' -Exactly -Times 1 -Scope It + Should -Invoke -CommandName 'Repair-SqlDscPowerBIReportServer' -Exactly -Times 1 -Scope It } } } @@ -1035,7 +1035,7 @@ Describe 'SqlRSSetup\Modify()' -Tag 'Modify' { } } - Mock -CommandName Repair-SqlDscBIReportServer -MockWith { + Mock -CommandName Repair-SqlDscPowerBIReportServer -MockWith { return 3010 } @@ -1053,7 +1053,7 @@ Describe 'SqlRSSetup\Modify()' -Tag 'Modify' { } ) - Should -Invoke -CommandName 'Repair-SqlDscBIReportServer' -Exactly -Times 1 -Scope It + Should -Invoke -CommandName 'Repair-SqlDscPowerBIReportServer' -Exactly -Times 1 -Scope It Should -Invoke -CommandName 'Set-DscMachineRebootRequired' -Exactly -Times 1 -Scope It } diff --git a/tests/Unit/Public/Install-SqlDscBIReportServer.Tests.ps1 b/tests/Unit/Public/Install-SqlDscPowerBIReportServer.Tests.ps1 similarity index 91% rename from tests/Unit/Public/Install-SqlDscBIReportServer.Tests.ps1 rename to tests/Unit/Public/Install-SqlDscPowerBIReportServer.Tests.ps1 index 5c3d3fb772..0323b86086 100644 --- a/tests/Unit/Public/Install-SqlDscBIReportServer.Tests.ps1 +++ b/tests/Unit/Public/Install-SqlDscPowerBIReportServer.Tests.ps1 @@ -46,14 +46,14 @@ AfterAll { Remove-Item -Path 'env:SqlServerDscCI' } -Describe 'Install-SqlDscBIReportServer' -Tag 'Public' { +Describe 'Install-SqlDscPowerBIReportServer' -Tag 'Public' { It 'Should have the correct parameters in parameter set ' -ForEach @( @{ MockParameterSetName = '__AllParameterSets' MockExpectedParameters = '[-MediaPath] [[-ProductKey] ] [[-Edition] ] [[-LogPath] ] [[-InstallFolder] ] [[-Timeout] ] -AcceptLicensingTerms [-EditionUpgrade] [-SuppressRestart] [-Force] [-PassThru] [-WhatIf] [-Confirm] []' } ) { - $result = (Get-Command -Name 'Install-SqlDscBIReportServer').ParameterSets | + $result = (Get-Command -Name 'Install-SqlDscPowerBIReportServer').ParameterSets | Where-Object -FilterScript { $_.Name -eq $mockParameterSetName } | @@ -91,7 +91,7 @@ Describe 'Install-SqlDscBIReportServer' -Tag 'Public' { Context 'When using parameter Confirm with value $false' { It 'Should call the Invoke-ReportServerSetupAction with Install action' { - Install-SqlDscBIReportServer -Confirm:$false @mockDefaultParameters + Install-SqlDscPowerBIReportServer -Confirm:$false @mockDefaultParameters Should -Invoke -CommandName Invoke-ReportServerSetupAction -ParameterFilter { $Install -eq $true -and @@ -103,7 +103,7 @@ Describe 'Install-SqlDscBIReportServer' -Tag 'Public' { Context 'When using parameter Force' { It 'Should call the Invoke-ReportServerSetupAction with Install action' { - Install-SqlDscBIReportServer -Force @mockDefaultParameters + Install-SqlDscPowerBIReportServer -Force @mockDefaultParameters Should -Invoke -CommandName Invoke-ReportServerSetupAction -ParameterFilter { $Install -eq $true -and @@ -114,7 +114,7 @@ Describe 'Install-SqlDscBIReportServer' -Tag 'Public' { Context 'When using parameter WhatIf' { It 'Should call Invoke-ReportServerSetupAction' { - Install-SqlDscBIReportServer -WhatIf @mockDefaultParameters + Install-SqlDscPowerBIReportServer -WhatIf @mockDefaultParameters Should -Invoke -CommandName Invoke-ReportServerSetupAction -Exactly -Times 1 -Scope It } @@ -138,7 +138,7 @@ Describe 'Install-SqlDscBIReportServer' -Tag 'Public' { } It 'Should pass all parameters to Invoke-ReportServerSetupAction' { - Install-SqlDscBIReportServer @installParameters + Install-SqlDscPowerBIReportServer @installParameters Should -Invoke -CommandName Invoke-ReportServerSetupAction -ParameterFilter { $Install -eq $true -and @@ -167,7 +167,7 @@ Describe 'Install-SqlDscBIReportServer' -Tag 'Public' { } It 'Should pass the Edition parameter to Invoke-ReportServerSetupAction' { - Install-SqlDscBIReportServer @installParameters + Install-SqlDscPowerBIReportServer @installParameters Should -Invoke -CommandName Invoke-ReportServerSetupAction -ParameterFilter { $Install -eq $true -and @@ -192,7 +192,7 @@ Describe 'Install-SqlDscBIReportServer' -Tag 'Public' { } It 'Should return the exit code when PassThru is specified' { - $result = Install-SqlDscBIReportServer -PassThru @mockDefaultParameters + $result = Install-SqlDscPowerBIReportServer -PassThru @mockDefaultParameters $result | Should -Be 3010 $result | Should -BeOfType [System.Int32] @@ -201,7 +201,7 @@ Describe 'Install-SqlDscBIReportServer' -Tag 'Public' { } It 'Should not return an exit code when PassThru is not specified' { - $result = Install-SqlDscBIReportServer @mockDefaultParameters + $result = Install-SqlDscPowerBIReportServer @mockDefaultParameters $result | Should -BeNullOrEmpty diff --git a/tests/Unit/Public/Repair-SqlDscBIReportServer.Tests.ps1 b/tests/Unit/Public/Repair-SqlDscPowerBIReportServer.Tests.ps1 similarity index 91% rename from tests/Unit/Public/Repair-SqlDscBIReportServer.Tests.ps1 rename to tests/Unit/Public/Repair-SqlDscPowerBIReportServer.Tests.ps1 index a9f5fd45ee..85a10d45ea 100644 --- a/tests/Unit/Public/Repair-SqlDscBIReportServer.Tests.ps1 +++ b/tests/Unit/Public/Repair-SqlDscPowerBIReportServer.Tests.ps1 @@ -46,14 +46,14 @@ AfterAll { Remove-Item -Path 'env:SqlServerDscCI' } -Describe 'Repair-SqlDscBIReportServer' -Tag 'Public' { +Describe 'Repair-SqlDscPowerBIReportServer' -Tag 'Public' { It 'Should have the correct parameters in parameter set ' -ForEach @( @{ MockParameterSetName = '__AllParameterSets' MockExpectedParameters = '[-MediaPath] [[-ProductKey] ] [[-Edition] ] [[-LogPath] ] [[-InstallFolder] ] [[-Timeout] ] -AcceptLicensingTerms [-EditionUpgrade] [-SuppressRestart] [-Force] [-PassThru] [-WhatIf] [-Confirm] []' } ) { - $result = (Get-Command -Name 'Repair-SqlDscBIReportServer').ParameterSets | + $result = (Get-Command -Name 'Repair-SqlDscPowerBIReportServer').ParameterSets | Where-Object -FilterScript { $_.Name -eq $mockParameterSetName } | @@ -91,7 +91,7 @@ Describe 'Repair-SqlDscBIReportServer' -Tag 'Public' { Context 'When using parameter Confirm with value $false' { It 'Should call the Invoke-ReportServerSetupAction with Repair action' { - Repair-SqlDscBIReportServer -Confirm:$false @mockDefaultParameters + Repair-SqlDscPowerBIReportServer -Confirm:$false @mockDefaultParameters Should -Invoke -CommandName Invoke-ReportServerSetupAction -ParameterFilter { $Repair -eq $true -and @@ -103,7 +103,7 @@ Describe 'Repair-SqlDscBIReportServer' -Tag 'Public' { Context 'When using parameter Force' { It 'Should call the Invoke-ReportServerSetupAction with Repair action' { - Repair-SqlDscBIReportServer -Force @mockDefaultParameters + Repair-SqlDscPowerBIReportServer -Force @mockDefaultParameters Should -Invoke -CommandName Invoke-ReportServerSetupAction -ParameterFilter { $Repair -eq $true -and @@ -114,7 +114,7 @@ Describe 'Repair-SqlDscBIReportServer' -Tag 'Public' { Context 'When using parameter WhatIf' { It 'Should call Invoke-ReportServerSetupAction' { - Repair-SqlDscBIReportServer -WhatIf @mockDefaultParameters + Repair-SqlDscPowerBIReportServer -WhatIf @mockDefaultParameters Should -Invoke -CommandName Invoke-ReportServerSetupAction -Exactly -Times 1 -Scope It } @@ -138,7 +138,7 @@ Describe 'Repair-SqlDscBIReportServer' -Tag 'Public' { } It 'Should pass all parameters to Invoke-ReportServerSetupAction' { - Repair-SqlDscBIReportServer @repairParameters + Repair-SqlDscPowerBIReportServer @repairParameters Should -Invoke -CommandName Invoke-ReportServerSetupAction -ParameterFilter { $Repair -eq $true -and @@ -167,7 +167,7 @@ Describe 'Repair-SqlDscBIReportServer' -Tag 'Public' { } It 'Should pass the Edition parameter to Invoke-ReportServerSetupAction' { - Repair-SqlDscBIReportServer @repairParameters + Repair-SqlDscPowerBIReportServer @repairParameters Should -Invoke -CommandName Invoke-ReportServerSetupAction -ParameterFilter { $Repair -eq $true -and @@ -192,7 +192,7 @@ Describe 'Repair-SqlDscBIReportServer' -Tag 'Public' { } It 'Should return the exit code when PassThru is specified' { - $result = Repair-SqlDscBIReportServer -PassThru @mockDefaultParameters + $result = Repair-SqlDscPowerBIReportServer -PassThru @mockDefaultParameters $result | Should -Be 3010 $result | Should -BeOfType [System.Int32] @@ -201,7 +201,7 @@ Describe 'Repair-SqlDscBIReportServer' -Tag 'Public' { } It 'Should not return an exit code when PassThru is not specified' { - $result = Repair-SqlDscBIReportServer @mockDefaultParameters + $result = Repair-SqlDscPowerBIReportServer @mockDefaultParameters $result | Should -BeNullOrEmpty diff --git a/tests/Unit/Public/Uninstall-SqlDscBIReportServer.Tests.ps1 b/tests/Unit/Public/Uninstall-SqlDscPowerBIReportServer.Tests.ps1 similarity index 90% rename from tests/Unit/Public/Uninstall-SqlDscBIReportServer.Tests.ps1 rename to tests/Unit/Public/Uninstall-SqlDscPowerBIReportServer.Tests.ps1 index 1f37e13d21..8ab13b1e32 100644 --- a/tests/Unit/Public/Uninstall-SqlDscBIReportServer.Tests.ps1 +++ b/tests/Unit/Public/Uninstall-SqlDscPowerBIReportServer.Tests.ps1 @@ -46,14 +46,14 @@ AfterAll { Remove-Item -Path 'env:SqlServerDscCI' } -Describe 'Uninstall-SqlDscBIReportServer' -Tag 'Public' { +Describe 'Uninstall-SqlDscPowerBIReportServer' -Tag 'Public' { It 'Should have the correct parameters in parameter set ' -ForEach @( @{ MockParameterSetName = '__AllParameterSets' MockExpectedParameters = '[-MediaPath] [[-LogPath] ] [[-Timeout] ] [-SuppressRestart] [-Force] [-PassThru] [-WhatIf] [-Confirm] []' } ) { - $result = (Get-Command -Name 'Uninstall-SqlDscBIReportServer').ParameterSets | + $result = (Get-Command -Name 'Uninstall-SqlDscPowerBIReportServer').ParameterSets | Where-Object -FilterScript { $_.Name -eq $mockParameterSetName } | @@ -89,7 +89,7 @@ Describe 'Uninstall-SqlDscBIReportServer' -Tag 'Public' { Context 'When using parameter Confirm with value $false' { It 'Should call the Invoke-ReportServerSetupAction with Uninstall action' { - Uninstall-SqlDscBIReportServer -Confirm:$false @mockDefaultParameters + Uninstall-SqlDscPowerBIReportServer -Confirm:$false @mockDefaultParameters Should -Invoke -CommandName Invoke-ReportServerSetupAction -ParameterFilter { $Uninstall -eq $true -and @@ -100,7 +100,7 @@ Describe 'Uninstall-SqlDscBIReportServer' -Tag 'Public' { Context 'When using parameter Force' { It 'Should call the Invoke-ReportServerSetupAction with Uninstall action' { - Uninstall-SqlDscBIReportServer -Force @mockDefaultParameters + Uninstall-SqlDscPowerBIReportServer -Force @mockDefaultParameters Should -Invoke -CommandName Invoke-ReportServerSetupAction -ParameterFilter { $Uninstall -eq $true -and @@ -111,7 +111,7 @@ Describe 'Uninstall-SqlDscBIReportServer' -Tag 'Public' { Context 'When using parameter WhatIf' { It 'Should call Invoke-ReportServerSetupAction' { - Uninstall-SqlDscBIReportServer -WhatIf @mockDefaultParameters + Uninstall-SqlDscPowerBIReportServer -WhatIf @mockDefaultParameters Should -Invoke -CommandName Invoke-ReportServerSetupAction -Exactly -Times 1 -Scope It } @@ -131,7 +131,7 @@ Describe 'Uninstall-SqlDscBIReportServer' -Tag 'Public' { } It 'Should pass all parameters to Invoke-ReportServerSetupAction' { - Uninstall-SqlDscBIReportServer @uninstallParameters + Uninstall-SqlDscPowerBIReportServer @uninstallParameters Should -Invoke -CommandName Invoke-ReportServerSetupAction -ParameterFilter { $Uninstall -eq $true -and @@ -159,7 +159,7 @@ Describe 'Uninstall-SqlDscBIReportServer' -Tag 'Public' { } It 'Should return the exit code when PassThru is specified' { - $result = Uninstall-SqlDscBIReportServer -PassThru @mockDefaultParameters + $result = Uninstall-SqlDscPowerBIReportServer -PassThru @mockDefaultParameters $result | Should -Be 3010 $result | Should -BeOfType [System.Int32] @@ -168,7 +168,7 @@ Describe 'Uninstall-SqlDscBIReportServer' -Tag 'Public' { } It 'Should not return an exit code when PassThru is not specified' { - $result = Uninstall-SqlDscBIReportServer @mockDefaultParameters + $result = Uninstall-SqlDscPowerBIReportServer @mockDefaultParameters $result | Should -BeNullOrEmpty