Skip to content

Commit

Permalink
[dsccommunity#864] SSRS 2017 integration tests
Browse files Browse the repository at this point in the history
  • Loading branch information
bozho committed May 6, 2019
1 parent 67439eb commit 58e7169
Show file tree
Hide file tree
Showing 2 changed files with 29 additions and 2 deletions.
18 changes: 17 additions & 1 deletion Tests/Integration/MSFT_SqlRS.Integration.Tests.ps1
Original file line number Diff line number Diff line change
Expand Up @@ -4,7 +4,7 @@ param()

Import-Module -Name (Join-Path -Path $PSScriptRoot -ChildPath '..\TestHelpers\CommonTestHelper.psm1')

if (Test-SkipContinuousIntegrationTask -Type 'Integration' -Category 'Integration_SQL2016')
if (Test-SkipContinuousIntegrationTask -Type 'Integration' -Category @('Integration_SQL2016','Integration_SQL2017'))
{
return
}
Expand All @@ -29,6 +29,22 @@ $TestEnvironment = Initialize-TestEnvironment `
-TestType Integration
#endregion

<#
This is used in both the configuration file and in this script file
to run the correct tests depending of what version of SQL Server is
being tested in the current job.
#>
if (Test-ContinuousIntegrationTaskCategory -Category 'Integration_SQL2017')
{
$script:sqlVersion = '140'
}
else
{
$script:sqlVersion = '130'
}

Write-Verbose -Message ('Running integration tests for SSRS version {0}' -f $script:sqlVersion) -Verbose

# Using try/finally to always cleanup.
try
{
Expand Down
13 changes: 12 additions & 1 deletion Tests/Integration/MSFT_SqlRS.config.ps1
Original file line number Diff line number Diff line change
Expand Up @@ -17,6 +17,17 @@ else
$mockLastDrive = ((Get-Volume).DriveLetter | Sort-Object | Select-Object -Last 1)
$mockIsoMediaDriveLetter = [char](([int][char]$mockLastDrive) + 1)

if($script:sqlVersion -eq '140')
{
# SQL2017
$instanceName = 'SSRS'
}
else
{
# SQL2016
$instanceName = 'DSCRS2016'
}

$ConfigurationData = @{
AllNodes = @(
@{
Expand All @@ -27,7 +38,7 @@ else
Service_UserName = "$env:COMPUTERNAME\svc-Reporting"
Service_Password = 'yig-C^Equ3'

InstanceName = 'DSCRS2016'
InstanceName = $instanceName
Features = 'RS'
InstallSharedDir = 'C:\Program Files\Microsoft SQL Server'
InstallSharedWOWDir = 'C:\Program Files (x86)\Microsoft SQL Server'
Expand Down

0 comments on commit 58e7169

Please sign in to comment.