Skip to content
Merged
Show file tree
Hide file tree
Changes from 3 commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
12 changes: 11 additions & 1 deletion ReportingServicesTools/Libraries/library.ps1
Original file line number Diff line number Diff line change
Expand Up @@ -111,10 +111,20 @@ namespace Microsoft.ReportingServicesTools
/// </summary>
SQLServer2017 = 14,

/// <summary>
/// SQL Server 2019
/// </summary>
SQLServer2019 = 15,

/// <summary>
/// SQL Server 2022
/// </summary>
SQLServer2022 = 16,

/// <summary>
/// SQL Server vNext
/// </summary>
SQLServervNext = 15
SQLServervNext = 17
Copy link
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Remove SQLServervNext, we added that when SQL 2019 was announced but without a release date or branding.

Copy link
Contributor Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Removed. Note the build is still failing with an error that looks intermittent on your builds? I see previous builds failing with the same issue that it looks like someone just kept hitting the retry button on until it worked... hopefully that's all my failure is?

Copy link
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

I’ll investigate the build issues as well.

}
}
"@
Expand Down
12 changes: 6 additions & 6 deletions Tests/Admin/Set-RsDatabase.Tests.ps1
Original file line number Diff line number Diff line change
@@ -1,10 +1,10 @@
function Get-DatabaseName() {
$wmiObject = New-RsConfigurationSettingObject -ReportServerInstance PBIRS -ReportServerVersion SQLServervNext
$wmiObject = New-RsConfigurationSettingObject -ReportServerInstance PBIRS -ReportServerVersion SQLServer2019
return $wmiObject.DatabaseName
}

function Get-CredentialType() {
$wmiObject = New-RsConfigurationSettingObject -ReportServerInstance PBIRS -ReportServerVersion SQLServervNext
$wmiObject = New-RsConfigurationSettingObject -ReportServerInstance PBIRS -ReportServerVersion SQLServer2019
switch ($wmiObject.DatabaseLogonType) {
0 { return 'Windows' }
1 { return 'SQL' }
Expand All @@ -26,7 +26,7 @@ Describe "Set-RsDatabase" {
$databaseServerName = 'localhost'
$databaseName = 'ReportServer' + [System.DateTime]::Now.Ticks
$credentialType = 'ServiceAccount'
Set-RsDatabase -DatabaseServerName $databaseServerName -DatabaseName $databaseName -DatabaseCredentialType $credentialType -Confirm:$false -Verbose -ReportServerInstance PBIRS -ReportServerVersion SQLServervNext
Set-RsDatabase -DatabaseServerName $databaseServerName -DatabaseName $databaseName -DatabaseCredentialType $credentialType -Confirm:$false -Verbose -ReportServerInstance PBIRS -ReportServerVersion SQLServer2019

It "Should update database and credentials" {
Get-DatabaseName | Should be $databaseName
Expand All @@ -39,7 +39,7 @@ Describe "Set-RsDatabase" {
$databaseName = 'ReportServer' + [System.DateTime]::Now.Ticks
$credentialType = 'SQL'
$credential = Get-SaCredentials
Set-RsDatabase -DatabaseServerName $databaseServerName -DatabaseName $databaseName -DatabaseCredentialType $credentialType -DatabaseCredential $credential -Confirm:$false -Verbose -ReportServerInstance PBIRS -ReportServerVersion SQLServervNext
Set-RsDatabase -DatabaseServerName $databaseServerName -DatabaseName $databaseName -DatabaseCredentialType $credentialType -DatabaseCredential $credential -Confirm:$false -Verbose -ReportServerInstance PBIRS -ReportServerVersion SQLServer2019

It "Should update database and credentials" {
Get-DatabaseName | Should be $databaseName
Expand All @@ -52,7 +52,7 @@ Describe "Set-RsDatabase" {
$databaseName = 'ReportServer'
$credentialType = 'SQL'
$credential = Get-SaCredentials
Set-RsDatabase -DatabaseServerName $databaseServerName -DatabaseName $databaseName -DatabaseCredentialType $credentialType -DatabaseCredential $credential -IsExistingDatabase -Confirm:$false -Verbose -ReportServerInstance PBIRS -ReportServerVersion SQLServervNext
Set-RsDatabase -DatabaseServerName $databaseServerName -DatabaseName $databaseName -DatabaseCredentialType $credentialType -DatabaseCredential $credential -IsExistingDatabase -Confirm:$false -Verbose -ReportServerInstance PBIRS -ReportServerVersion SQLServer2019

It "Should update database and credentials" {
Get-DatabaseName | Should be $databaseName
Expand All @@ -64,7 +64,7 @@ Describe "Set-RsDatabase" {
$databaseServerName = 'localhost'
$databaseName = 'ReportServer'
$credentialType = 'ServiceAccount'
Set-RsDatabase -DatabaseServerName $databaseServerName -DatabaseName $databaseName -DatabaseCredentialType $credentialType -IsExistingDatabase -Confirm:$false -Verbose -ReportServerInstance PBIRS -ReportServerVersion SQLServervNext
Set-RsDatabase -DatabaseServerName $databaseServerName -DatabaseName $databaseName -DatabaseCredentialType $credentialType -IsExistingDatabase -Confirm:$false -Verbose -ReportServerInstance PBIRS -ReportServerVersion SQLServer2019

It "Should update database and credentials" {
Get-DatabaseName | Should be $databaseName
Expand Down
6 changes: 3 additions & 3 deletions Tests/Admin/Set-RsDatabaseCredentials.Tests.ps1
Original file line number Diff line number Diff line change
@@ -1,5 +1,5 @@
function Get-CredentialType() {
$wmiObject = New-RsConfigurationSettingObject -ReportServerInstance PBIRS -ReportServerVersion SQLServervNext
$wmiObject = New-RsConfigurationSettingObject -ReportServerInstance PBIRS -ReportServerVersion SQLServer2019
switch ($wmiObject.DatabaseLogonType) {
0 { return 'Windows' }
1 { return 'SQL' }
Expand All @@ -20,7 +20,7 @@ Describe "Set-RsDatabaseCredentials" {
Context "Changing database credential type to ServiceAccount credentials" {
$credentialType = 'SQL'
$credential = Get-SaCredentials
Set-RsDatabaseCredentials -DatabaseCredentialType $credentialType -DatabaseCredential $credential -Confirm:$false -Verbose -ReportServerInstance PBIRS -ReportServerVersion SQLServervNext
Set-RsDatabaseCredentials -DatabaseCredentialType $credentialType -DatabaseCredential $credential -Confirm:$false -Verbose -ReportServerInstance PBIRS -ReportServerVersion SQLServer2019

It "Should update credentials" {
Get-CredentialType | Should be $credentialType
Expand All @@ -29,7 +29,7 @@ Describe "Set-RsDatabaseCredentials" {

Context "Changing database credential type to SQL credentials" {
$credentialType = 'ServiceAccount'
Set-RsDatabaseCredentials -DatabaseCredentialType $credentialType -Confirm:$false -Verbose -ReportServerInstance PBIRS -ReportServerVersion SQLServervNext
Set-RsDatabaseCredentials -DatabaseCredentialType $credentialType -Confirm:$false -Verbose -ReportServerInstance PBIRS -ReportServerVersion SQLServer2019

It "Should update credentials" {
Get-CredentialType | Should be $credentialType
Expand Down
6 changes: 3 additions & 3 deletions appveyor.yml
Original file line number Diff line number Diff line change
Expand Up @@ -67,9 +67,9 @@ before_test:

Import-Module .\ReportingServicesTools\ReportingServicesTools.psd1
Write-Host "Configuring PBI RS" (Get-Date).DateTime
Set-RsDatabase -ReportServerInstance PBIRS -ReportServerVersion SQLServervNext -DatabaseServerName localhost -DatabaseName ReportServer -DatabaseCredentialType ServiceAccount -Confirm:$false
Set-PbiRsUrlReservation -ReportServerInstance PBIRS -ReportServerVersion SQLServervNext
try {Initialize-Rs -ReportServerInstance PBIRS -ReportServerVersion SQLServervNext} catch {}
Set-RsDatabase -ReportServerInstance PBIRS -ReportServerVersion SQLServer2019 -DatabaseServerName localhost -DatabaseName ReportServer -DatabaseCredentialType ServiceAccount -Confirm:$false
Set-PbiRsUrlReservation -ReportServerInstance PBIRS -ReportServerVersion SQLServer2019
try {Initialize-Rs -ReportServerInstance PBIRS -ReportServerVersion SQLServer2019} catch {}
Stop-Service PowerBIReportServer
Start-Service PowerBIReportServer
Start-Service SQLSERVERAGENT
Expand Down