diff --git a/Tests/Integration/MSFT_SqlRS.Integration.Tests.ps1 b/Tests/Integration/MSFT_SqlRS.Integration.Tests.ps1 index 492fdb216..ed0dd0977 100644 --- a/Tests/Integration/MSFT_SqlRS.Integration.Tests.ps1 +++ b/Tests/Integration/MSFT_SqlRS.Integration.Tests.ps1 @@ -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 } @@ -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 { diff --git a/Tests/Integration/MSFT_SqlRS.config.ps1 b/Tests/Integration/MSFT_SqlRS.config.ps1 index 702715389..c1621c533 100644 --- a/Tests/Integration/MSFT_SqlRS.config.ps1 +++ b/Tests/Integration/MSFT_SqlRS.config.ps1 @@ -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 = @( @{ @@ -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'