Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

SqlServerDsc: Added SQL Server 2019 Integration Tests (and unit test) plus additional, 'SqlSetup' resource InstallSharedDir fix. #1676

Merged
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
Show all changes
39 commits
Select commit Hold shift + click to select a range
896937e
Added 'FailedToObtainServerInstance' string
SphenicPaul Dec 13, 2020
3d7c9de
Added condition in 'Get-ServerProtocolObject' to throw exception if $…
SphenicPaul Dec 13, 2020
1a712d7
Updated changelog to add issue #1628 fix comments (and correct typo)
SphenicPaul Dec 13, 2020
f748d89
Updated 'FailedToObtainServerInstance' error message
SphenicPaul Dec 13, 2020
003a754
Updated 'Get-ServerProtocolObject' to pass $ServerName into 'FailedTo…
SphenicPaul Dec 13, 2020
c98223a
Updated files to reflect originals
SphenicPaul Jan 13, 2021
a83ee87
Merge branch 'main' of https://github.com/dsccommunity/SqlServerDsc i…
SphenicPaul Jan 23, 2021
0161e78
Added 'Test_Integration_SQL2019' job into 'azure-pipelines.yml', pipe…
SphenicPaul Jan 23, 2021
093007a
Added 'Integration_SQL2019' to 'Test-BuildCategory', integration pre-…
SphenicPaul Jan 23, 2021
db87c33
Added 'Integration_SQL2019' to 'Test-BuildCategory', integration pre-…
SphenicPaul Jan 23, 2021
ccdc2ad
Updated 'README' and 'CONTRIBUTING' documents to include SQL 2019.
SphenicPaul Jan 23, 2021
af07d62
Updated comments to include SQL 2019.
SphenicPaul Jan 23, 2021
213f824
Added conditions/comments for $script:sqlVersion -in/-eq '150; (i.e.…
SphenicPaul Jan 23, 2021
0fadfe7
Added '150' and '15', major versions to 'SqlServer' tests and configu…
SphenicPaul Jan 23, 2021
09639a2
Renamed test to into '(or newer)'
SphenicPaul Jan 23, 2021
2754e0b
Added version '15' (i.e. SQL2019) and added additional, integration t…
SphenicPaul Jan 23, 2021
9678ea7
Removed 'Test_HQRM', and 'Test_Integration_SQL2017' jobs from pipelin…
SphenicPaul Jan 23, 2021
711a6d5
Updated SQL2019, expected version to v15.0.2000.5 within SqlRS, integ…
SphenicPaul Jan 23, 2021
c8cefa9
Added 'DownloadExePath' and 'DownloadIsoPath' configuration values fo…
SphenicPaul Jan 23, 2021
41f9c2a
Added ISO download (via EXE) into 'SqlSetup', integration tests.
SphenicPaul Jan 23, 2021
1ad84b4
Removed 'Code_Coverage' from 'azure-pieplines.yml' (will be added bac…
SphenicPaul Jan 23, 2021
80d473c
Updated 'CHANGELOG.md' to include addition of SQL Server 2019 tests.
SphenicPaul Jan 23, 2021
05128a5
Added 'DownloadExeName' and 'DownloadIsoName' properties for SQL2019,…
SphenicPaul Jan 23, 2021
310a586
Added missing bracket into 'elseif' statement in 'SqlRS' resource, in…
SphenicPaul Jan 23, 2021
5dfb385
Updated 'SqlSetup' to add `InstallSharedDir` property support when us…
SphenicPaul Jan 23, 2021
1a5810b
Updated 'CHANGELOG.md' detail change to add `InstallSharedDir` proper…
SphenicPaul Jan 23, 2021
212f713
Moved the 'InstallSharedDir' property, 'SqlSetup' into 'Fixed' section.
SphenicPaul Jan 23, 2021
b3fc919
Added 'Test_HQRM' and 'Test_Integration_SQL2016' jobs back into 'azur…
SphenicPaul Jan 23, 2021
fffbb18
Added 'Code_Coverage' job back into 'azure-pieplines.yml'.
SphenicPaul Jan 23, 2021
c963bcd
Corrected 'separate' spelling.
SphenicPaul Jan 23, 2021
392548c
Removed blank line in 'azure-pipelines.yml'
SphenicPaul Jan 23, 2021
e4cd431
Added @ in 'SqlRS' configuration.
SphenicPaul Jan 23, 2021
69ab728
Removed list of resources from 'CHANGELOG.md' for 'SqlServerDsc', new…
SphenicPaul Jan 23, 2021
86b51ba
Removed comment in `SqlRSSetup`, integration test
SphenicPaul Jan 23, 2021
d548265
Updated 'SqlSetup' unit tests to add $mockSqlMajorVersion of '15'.
SphenicPaul Jan 23, 2021
7b062e9
Removed use of $downloadExeName, $downloadIsoName, 'DownloadExePath' …
SphenicPaul Jan 24, 2021
77d90a1
Moved '[MountImage]MountIsoMedia' and '[WaitForVolume]WaitForMountOfI…
SphenicPaul Jan 24, 2021
12ed91c
Removed 'SqlRSSetup' integration tests running as part of 'Integratio…
SphenicPaul Jan 24, 2021
4aebf11
Updated 'SqlRS', integration tests from running within SQL2019 integr…
SphenicPaul Jan 24, 2021
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
8 changes: 7 additions & 1 deletion CHANGELOG.md
Original file line number Diff line number Diff line change
Expand Up @@ -25,13 +25,17 @@ and this project adheres to [Semantic Versioning](https://semver.org/spec/v2.0.0
where `PasswordExpirationEnabled` is `$true` but `PasswordPolicyEnforced` is
`$false`).

- SqlServerDsc
- Added unit tests and integration tests for SQL Server 2019
([issue #1310](https://github.com/dsccommunity/SqlServerDsc/issues/1310)).

### Fixed

- SqlServerDsc
- The component `gitversion` that is used in the pipeline was wrongly
configured when the repository moved to the new default branch `main`.
It no longer throws an error when using newer versions of GitVersion
([issue #1674](https://github.com/dsccommunity/SqlServerDsc/issues/1674),
([issue #1674](https://github.com/dsccommunity/SqlServerDsc/issues/1674)).
- SqlLogin
- Added integration tests to assert `LoginPasswordExpirationEnabled`,
`LoginPasswordPolicyEnforced` and `LoginMustChangePassword` properties/parameters
Expand All @@ -46,6 +50,8 @@ and this project adheres to [Semantic Versioning](https://semver.org/spec/v2.0.0
- SqlRSSetup
- If parameter `SuppressRestart` is set to `$false` the `/norestart`
argument is no longer wrongly added ([issue #1401](https://github.com/dsccommunity/SqlServerDsc/issues/1401)).
- SqlSetup
- Added/corrected `InstallSharedDir`, property output when using SQL Server 2019.

## [15.0.1] - 2021-01-09

Expand Down
4 changes: 2 additions & 2 deletions CONTRIBUTING.md
Original file line number Diff line number Diff line change
Expand Up @@ -240,8 +240,8 @@ To make sure a integration tests is run in the correct order the integration
tests are grouped in the file `azure-pipelines.yml` in the integration tests
jobs.

There are two integration tests jobs that each test SQL Server 2016 and
SQL Server 2017.
There are three, separate, integration tests jobs that each, independently, test
SQL Server 2016, SQL Server 2017 and SQL Server 2019.

### Testing of examples files

Expand Down
68 changes: 68 additions & 0 deletions azure-pipelines.yml
Original file line number Diff line number Diff line change
Expand Up @@ -248,6 +248,74 @@ stages:
testResultsFiles: '$(buildFolderName)/$(testResultFolderName)/NUnit*.xml'
testRunTitle: 'Integration (Windows Server Core)'

- job: Test_Integration_SQL2019
displayName: 'Integration (SQL2019)'
pool:
vmImage: 'windows-2019'
timeoutInMinutes: 0
variables:
# This sets environment variable $env:CI.
CI: true
# This sets environment variable $env:CONFIGURATION.
configuration: Integration_SQL2019
steps:
- task: DownloadBuildArtifacts@0
displayName: 'Download Build Artifact'
inputs:
buildType: 'current'
downloadType: 'single'
artifactName: $(buildArtifactName)
downloadPath: '$(Build.SourcesDirectory)'
- task: PowerShell@2
name: configureWinRM
displayName: 'Configure WinRM'
inputs:
targetType: 'inline'
script: 'winrm quickconfig -quiet'
pwsh: false
- powershell: |
./build.ps1 -Tasks test -CodeCoverageThreshold 0 -PesterScript @(
# Run the integration tests in a specific group order.
# Group 1
'tests/Integration/DSC_SqlSetup.Integration.Tests.ps1'
# Group 2
'tests/Integration/DSC_SqlAgentAlert.Integration.Tests.ps1'
'tests/Integration/DSC_SqlLogin.Integration.Tests.ps1'
'tests/Integration/DSC_SqlEndpoint.Integration.Tests.ps1'
'tests/Integration/DSC_SqlDatabaseMail.Integration.Tests.ps1'
'tests/Integration/DSC_SqlRSSetup.Integration.Tests.ps1'
'tests/Integration/DSC_SqlDatabaseDefaultLocation.Integration.Tests.ps1'
'tests/Integration/DSC_SqlDatabase.Integration.Tests.ps1'
'tests/Integration/DSC_SqlAlwaysOnService.Integration.Tests.ps1'
'tests/Integration/DSC_SqlAgentOperator.Integration.Tests.ps1'
'tests/Integration/DSC_SqlServiceAccount.Integration.Tests.ps1'
'tests/Integration/DSC_SqlAgentFailsafe.Integration.Tests.ps1'
# Group 3
'tests/Integration/DSC_SqlRole.Integration.Tests.ps1'
'tests/Integration/DSC_SqlRS.Integration.Tests.ps1'
'tests/Integration/DSC_SqlDatabaseUser.Integration.Tests.ps1'
'tests/Integration/DSC_SqlReplication.Integration.Tests.ps1'
# Group 4
'tests/Integration/DSC_SqlScript.Integration.Tests.ps1'
'tests/Integration/DSC_SqlDatabasePermission.Integration.Tests.ps1'
# Group 5
'tests/Integration/DSC_SqlSecureConnection.Integration.Tests.ps1'
'tests/Integration/DSC_SqlScriptQuery.Integration.Tests.ps1'
'tests/Integration/DSC_SqlProtocol.Integration.Tests.ps1'
# Group 6 (tests makes changes that could make SQL Server to loose connectivity)
'tests/Integration/DSC_SqlProtocolTcpIp.Integration.Tests.ps1'
'tests/Integration/DSC_SqlDatabaseObjectPermission.Integration.Tests.ps1'
)
name: test
displayName: 'Run Integration Test'
- task: PublishTestResults@2
displayName: 'Publish Test Results'
condition: succeededOrFailed()
inputs:
testResultsFormat: 'NUnit'
testResultsFiles: '$(buildFolderName)/$(testResultFolderName)/NUnit*.xml'
testRunTitle: 'Integration (Windows Server Core)'

- job: Code_Coverage
displayName: 'Publish Code Coverage'
dependsOn: Test_Unit
Expand Down
2 changes: 1 addition & 1 deletion source/DSCResources/DSC_SqlRS/DSC_SqlRS.psm1
Original file line number Diff line number Diff line change
Expand Up @@ -903,7 +903,7 @@ function Get-ReportingServicesData

if (Test-Path -Path "HKLM:\SOFTWARE\Microsoft\Microsoft SQL Server\$instanceId\MSSQLServer\CurrentVersion")
{
# SQL Server 2017 SSRS stores current SQL Server version to a different Registry path.
# SQL Server 2017 and 2019 SSRS stores current SQL Server version to a different Registry path.
$sqlVersion = [int]((Get-ItemProperty -Path "HKLM:\SOFTWARE\Microsoft\Microsoft SQL Server\$InstanceId\MSSQLServer\CurrentVersion" -Name 'CurrentVersion').CurrentVersion).Split('.')[0]
}
else
Expand Down
6 changes: 3 additions & 3 deletions source/DSCResources/DSC_SqlSetup/DSC_SqlSetup.psm1
Original file line number Diff line number Diff line change
Expand Up @@ -993,7 +993,7 @@ function Set-TargetResource

foreach ($feature in $featuresArray)
{
if (($sqlVersion -in ('13', '14')) -and ($feature -in ('ADV_SSMS', 'SSMS')))
if (($sqlVersion -in ('13', '14', '15')) -and ($feature -in ('ADV_SSMS', 'SSMS')))
{
$errorMessage = $script:localizedData.FeatureNotSupported -f $feature
New-InvalidOperationException -Message $errorMessage
Expand All @@ -1017,7 +1017,7 @@ function Set-TargetResource
# If SQL shared components already installed, clear InstallShared*Dir variables
switch ($sqlVersion)
{
{ $_ -in ('10', '11', '12', '13', '14') }
{ $_ -in ('10', '11', '12', '13', '14', '15') }
{
if ((Get-Variable -Name 'InstallSharedDir' -ErrorAction SilentlyContinue) -and (Get-ItemProperty 'HKLM:\SOFTWARE\Microsoft\Windows\CurrentVersion\Installer\UserData\S-1-5-18\Components\FEE2E540D20152D4597229B6CFBC0A69' -ErrorAction SilentlyContinue))
{
Expand Down Expand Up @@ -3247,7 +3247,7 @@ function Get-SqlSharedPaths

switch ($SqlServerMajorVersion)
{
{ $_ -in ('10', '11', '12', '13', '14') }
{ $_ -in ('10', '11', '12', '13', '14', '15') }
{
$registryKeySharedDir = 'FEE2E540D20152D4597229B6CFBC0A69'
$registryKeySharedWOWDir = 'A79497A344129F64CA7D69C56F5DD8B4'
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -1247,7 +1247,7 @@ function Restart-ReportingServicesService

if ($InstanceName -eq 'SSRS')
{
# Check if we're dealing with SSRS 2017
# Check if we're dealing with SSRS 2017 or SQL2019
$ServiceName = 'SQLServerReportingServices'

Write-Verbose -Message ($script:localizedData.GetServiceInformation -f $ServiceName) -Verbose
Expand Down
Original file line number Diff line number Diff line change
@@ -1,6 +1,6 @@
Import-Module -Name (Join-Path -Path $PSScriptRoot -ChildPath '..\TestHelpers\CommonTestHelper.psm1')

if (-not (Test-BuildCategory -Type 'Integration' -Category @('Integration_SQL2016','Integration_SQL2017')))
if (-not (Test-BuildCategory -Type 'Integration' -Category @('Integration_SQL2016','Integration_SQL2017','Integration_SQL2019')))
{
return
}
Expand Down
Original file line number Diff line number Diff line change
@@ -1,6 +1,6 @@
Import-Module -Name (Join-Path -Path $PSScriptRoot -ChildPath '..\TestHelpers\CommonTestHelper.psm1')

if (-not (Test-BuildCategory -Type 'Integration' -Category @('Integration_SQL2016','Integration_SQL2017')))
if (-not (Test-BuildCategory -Type 'Integration' -Category @('Integration_SQL2016','Integration_SQL2017','Integration_SQL2019')))
{
return
}
Expand Down
Original file line number Diff line number Diff line change
@@ -1,6 +1,6 @@
Import-Module -Name (Join-Path -Path $PSScriptRoot -ChildPath '..\TestHelpers\CommonTestHelper.psm1')

if (-not (Test-BuildCategory -Type 'Integration' -Category @('Integration_SQL2016','Integration_SQL2017')))
if (-not (Test-BuildCategory -Type 'Integration' -Category @('Integration_SQL2016','Integration_SQL2017','Integration_SQL2019')))
{
return
}
Expand Down
2 changes: 1 addition & 1 deletion tests/Integration/DSC_SqlDatabase.Integration.Tests.ps1
Original file line number Diff line number Diff line change
@@ -1,6 +1,6 @@
Import-Module -Name (Join-Path -Path $PSScriptRoot -ChildPath '..\TestHelpers\CommonTestHelper.psm1')

if (-not (Test-BuildCategory -Type 'Integration' -Category @('Integration_SQL2016','Integration_SQL2017')))
if (-not (Test-BuildCategory -Type 'Integration' -Category @('Integration_SQL2016','Integration_SQL2017','Integration_SQL2019')))
{
return
}
Expand Down
Original file line number Diff line number Diff line change
@@ -1,6 +1,6 @@
Import-Module -Name (Join-Path -Path $PSScriptRoot -ChildPath '..\TestHelpers\CommonTestHelper.psm1')

if (-not (Test-BuildCategory -Type 'Integration' -Category @('Integration_SQL2016','Integration_SQL2017')))
if (-not (Test-BuildCategory -Type 'Integration' -Category @('Integration_SQL2016','Integration_SQL2017','Integration_SQL2019')))
{
return
}
Expand Down
Original file line number Diff line number Diff line change
@@ -1,6 +1,6 @@
Import-Module -Name (Join-Path -Path $PSScriptRoot -ChildPath '..\TestHelpers\CommonTestHelper.psm1')

if (-not (Test-BuildCategory -Type 'Integration' -Category @('Integration_SQL2016','Integration_SQL2017')))
if (-not (Test-BuildCategory -Type 'Integration' -Category @('Integration_SQL2016','Integration_SQL2017','Integration_SQL2019')))
{
return
}
Expand Down
Original file line number Diff line number Diff line change
@@ -1,6 +1,6 @@
Import-Module -Name (Join-Path -Path $PSScriptRoot -ChildPath '..\TestHelpers\CommonTestHelper.psm1')

if (-not (Test-BuildCategory -Type 'Integration' -Category @('Integration_SQL2016','Integration_SQL2017')))
if (-not (Test-BuildCategory -Type 'Integration' -Category @('Integration_SQL2016','Integration_SQL2017','Integration_SQL2019')))
{
return
}
Expand Down
Original file line number Diff line number Diff line change
@@ -1,6 +1,6 @@
Import-Module -Name (Join-Path -Path $PSScriptRoot -ChildPath '..\TestHelpers\CommonTestHelper.psm1')

if (-not (Test-BuildCategory -Type 'Integration' -Category @('Integration_SQL2016','Integration_SQL2017')))
if (-not (Test-BuildCategory -Type 'Integration' -Category @('Integration_SQL2016','Integration_SQL2017','Integration_SQL2019')))
{
return
}
Expand Down
Original file line number Diff line number Diff line change
@@ -1,6 +1,6 @@
Import-Module -Name (Join-Path -Path $PSScriptRoot -ChildPath '..\TestHelpers\CommonTestHelper.psm1')

if (-not (Test-BuildCategory -Type 'Integration' -Category @('Integration_SQL2016','Integration_SQL2017')))
if (-not (Test-BuildCategory -Type 'Integration' -Category @('Integration_SQL2016','Integration_SQL2017','Integration_SQL2019')))
{
return
}
Expand Down
2 changes: 1 addition & 1 deletion tests/Integration/DSC_SqlEndpoint.Integration.Tests.ps1
Original file line number Diff line number Diff line change
@@ -1,6 +1,6 @@
Import-Module -Name (Join-Path -Path $PSScriptRoot -ChildPath '..\TestHelpers\CommonTestHelper.psm1')

if (-not (Test-BuildCategory -Type 'Integration' -Category @('Integration_SQL2016', 'Integration_SQL2017')))
if (-not (Test-BuildCategory -Type 'Integration' -Category @('Integration_SQL2016', 'Integration_SQL2017','Integration_SQL2019')))
{
return
}
Expand Down
2 changes: 1 addition & 1 deletion tests/Integration/DSC_SqlLogin.Integration.Tests.ps1
Original file line number Diff line number Diff line change
@@ -1,6 +1,6 @@
Import-Module -Name (Join-Path -Path $PSScriptRoot -ChildPath '..\TestHelpers\CommonTestHelper.psm1')

if (-not (Test-BuildCategory -Type 'Integration' -Category @('Integration_SQL2016','Integration_SQL2017')))
if (-not (Test-BuildCategory -Type 'Integration' -Category @('Integration_SQL2016','Integration_SQL2017','Integration_SQL2019')))
{
return
}
Expand Down
2 changes: 1 addition & 1 deletion tests/Integration/DSC_SqlProtocol.Integration.Tests.ps1
Original file line number Diff line number Diff line change
@@ -1,6 +1,6 @@
Import-Module -Name (Join-Path -Path $PSScriptRoot -ChildPath '..\TestHelpers\CommonTestHelper.psm1')

if (-not (Test-BuildCategory -Type 'Integration' -Category @('Integration_SQL2016','Integration_SQL2017')))
if (-not (Test-BuildCategory -Type 'Integration' -Category @('Integration_SQL2016','Integration_SQL2017','Integration_SQL2019')))
{
return
}
Expand Down
Original file line number Diff line number Diff line change
@@ -1,6 +1,6 @@
Import-Module -Name (Join-Path -Path $PSScriptRoot -ChildPath '..\TestHelpers\CommonTestHelper.psm1')

if (-not (Test-BuildCategory -Type 'Integration' -Category @('Integration_SQL2016','Integration_SQL2017')))
if (-not (Test-BuildCategory -Type 'Integration' -Category @('Integration_SQL2016','Integration_SQL2017','Integration_SQL2019')))
{
return
}
Expand Down
9 changes: 5 additions & 4 deletions tests/Integration/DSC_SqlRS.Integration.Tests.ps1
Original file line number Diff line number Diff line change
@@ -1,5 +1,6 @@
Import-Module -Name (Join-Path -Path $PSScriptRoot -ChildPath '..\TestHelpers\CommonTestHelper.psm1')

# Not currently run for SQL Server 2019
if (-not (Test-BuildCategory -Type 'Integration' -Category @('Integration_SQL2016','Integration_SQL2017')))
{
return
Expand Down Expand Up @@ -129,7 +130,7 @@ try
It 'Should be able to access the ReportServer site without any error' {
if($script:sqlVersion -eq '140')
{
# SSRS 2017 does not support multiple instances
# SSRS 2017 and 2019 do not support multiple instances
$reportServerUri = 'http://{0}/ReportServer' -f $env:COMPUTERNAME
}
else
Expand Down Expand Up @@ -159,7 +160,7 @@ try
It 'Should be able to access the Reports site without any error' {
if($script:sqlVersion -eq '140')
{
# SSRS 2017 does not support multiple instances
# SSRS 2017 and 2019 do not support multiple instances
$reportsUri = 'http://{0}/Reports' -f $env:COMPUTERNAME
}
else
Expand Down Expand Up @@ -241,7 +242,7 @@ try
It 'Should not be able to access the ReportServer site and throw an error message' {
if($script:sqlVersion -eq '140')
{
# SSRS 2017 does not support multiple instances
# SSRS 2017 and 2019 do not support multiple instances
$reportServerUri = 'http://{0}/ReportServer' -f $env:COMPUTERNAME
}
else
Expand Down Expand Up @@ -301,7 +302,7 @@ try
It 'Should be able to access the ReportServer site without any error' {
if($script:sqlVersion -eq '140')
{
# SSRS 2017 does not support multiple instances
# SSRS 2017 and 2019 do not support multiple instances
$reportServerUri = 'http://{0}/ReportServer' -f $env:COMPUTERNAME
}
else
Expand Down
42 changes: 24 additions & 18 deletions tests/Integration/DSC_SqlRS.config.ps1
Original file line number Diff line number Diff line change
Expand Up @@ -17,7 +17,13 @@ else
$mockLastDrive = ((Get-Volume).DriveLetter | Sort-Object | Select-Object -Last 1)
$mockIsoMediaDriveLetter = [char](([int][char]$mockLastDrive) + 1)

if($script:sqlVersion -eq '140')
if($script:sqlVersion -eq '150')
{
# SQL2019
$instanceName = 'SSRS'
$isoImageName = 'SQL2019.iso'
}
elseif($script:sqlVersion -eq '140')
{
# SQL2017
$instanceName = 'SSRS'
Expand Down Expand Up @@ -74,20 +80,6 @@ Configuration DSC_SqlRS_CreateDependencies_Config

node $AllNodes.NodeName
{
MountImage 'MountIsoMedia'
{
ImagePath = $Node.ImagePath
DriveLetter = $Node.DriveLetter
Ensure = 'Present'
}

WaitForVolume 'WaitForMountOfIsoMedia'
{
DriveLetter = $Node.DriveLetter
RetryIntervalSec = 5
RetryCount = 10
}

User 'CreateReportingServicesServiceAccount'
{
Ensure = 'Present'
Expand All @@ -105,6 +97,20 @@ Configuration DSC_SqlRS_CreateDependencies_Config

if($script:sqlVersion -eq '130')
{
MountImage 'MountIsoMedia'
{
ImagePath = $Node.ImagePath
DriveLetter = $Node.DriveLetter
Ensure = 'Present'
}

WaitForVolume 'WaitForMountOfIsoMedia'
{
DriveLetter = $Node.DriveLetter
RetryIntervalSec = 5
RetryCount = 10
}

SqlSetup 'InstallReportingServicesInstance'
{
InstanceName = $Node.InstanceName
Expand Down Expand Up @@ -133,10 +139,10 @@ Configuration DSC_SqlRS_CreateDependencies_Config
}
}
<#
DSC_SqlRSSetup.Integration.Tests.ps1 will have installed SSRS 2017.
DSC_SqlRSSetup.Integration.Tests.ps1 will have installed SSRS 2017 or 2019.
We just need to start SSRS.
#>
elseif($script:sqlVersion -eq '140')
elseif($script:sqlVersion -in @('150','140'))
{
Service 'StartReportingServicesInstance'
{
Expand Down Expand Up @@ -257,7 +263,7 @@ Configuration DSC_SqlRS_StopReportingServicesInstance_Config
State = 'Stopped'
}
}
elseif($script:sqlVersion -eq '140')
elseif($script:sqlVersion -in @('150','140'))
{
Service 'StopReportingServicesInstance'
{
Expand Down
2 changes: 1 addition & 1 deletion tests/Integration/DSC_SqlRSSetup.Integration.Tests.ps1
Original file line number Diff line number Diff line change
@@ -1,6 +1,6 @@
Import-Module -Name (Join-Path -Path $PSScriptRoot -ChildPath '..\TestHelpers\CommonTestHelper.psm1')

# Run only for SQL 2017 integration testing.
# Run only for SQL Server 2017, integration testing at present (not SQL Server 2019)
if (-not (Test-BuildCategory -Type 'Integration' -Category @('Integration_SQL2017')))
{
return
Expand Down
Loading