From 3575f8ae9b02dc13fab8647b6fd6caf70a306392 Mon Sep 17 00:00:00 2001 From: Marko Bozikovic Date: Mon, 8 Apr 2019 15:14:14 +0200 Subject: [PATCH] [#864] SSRS 2017 integration tests, another try --- Tests/Integration/MSFT_SqlRS.config.ps1 | 57 ++++++++++++++----------- 1 file changed, 31 insertions(+), 26 deletions(-) diff --git a/Tests/Integration/MSFT_SqlRS.config.ps1 b/Tests/Integration/MSFT_SqlRS.config.ps1 index c1621c533..894f77884 100644 --- a/Tests/Integration/MSFT_SqlRS.config.ps1 +++ b/Tests/Integration/MSFT_SqlRS.config.ps1 @@ -21,11 +21,13 @@ else { # SQL2017 $instanceName = 'SSRS' + $isoImageName = 'SQL2017.iso' } else { # SQL2016 $instanceName = 'DSCRS2016' + $isoImageName = 'SQL2016.iso' } $ConfigurationData = @{ @@ -46,7 +48,7 @@ else SuppressReboot = $true # Make sure we don't reboot during testing. ForceReboot = $false - ImagePath = "$env:TEMP\SQL2016.iso" + ImagePath = "$env:TEMP\$isoImageName" DriveLetter = $mockIsoMediaDriveLetter DatabaseServerName = $env:COMPUTERNAME @@ -101,32 +103,35 @@ Configuration MSFT_SqlRS_CreateDependencies_Config Ensure = 'Present' } - SqlSetup 'InstallReportingServicesInstance' + # MSFT_SqlRSSetup.Integration.Tests.ps1 will have installed SSRS 2017. + if($script:sqlVersion -eq '130') { - InstanceName = $Node.InstanceName - Features = $Node.Features - SourcePath = "$($Node.DriveLetter):\" - BrowserSvcStartupType = 'Automatic' - InstallSharedDir = $Node.InstallSharedDir - InstallSharedWOWDir = $Node.InstallSharedWOWDir - UpdateEnabled = $Node.UpdateEnabled - SuppressReboot = $Node.SuppressReboot - ForceReboot = $Node.ForceReboot - RSSvcAccount = New-Object ` - -TypeName System.Management.Automation.PSCredential ` - -ArgumentList @($Node.Service_UserName, (ConvertTo-SecureString -String $Node.Service_Password -AsPlainText -Force)) - - DependsOn = @( - '[WaitForVolume]WaitForMountOfIsoMedia' - '[User]CreateReportingServicesServiceAccount' - '[WindowsFeature]NetFramework45' - ) - - PsDscRunAsCredential = New-Object ` - -TypeName System.Management.Automation.PSCredential ` - -ArgumentList @( - $Node.RunAs_UserName, (ConvertTo-SecureString -String $Node.RunAs_Password -AsPlainText -Force)) - + SqlSetup 'InstallReportingServicesInstance' + { + InstanceName = $Node.InstanceName + Features = $Node.Features + SourcePath = "$($Node.DriveLetter):\" + BrowserSvcStartupType = 'Automatic' + InstallSharedDir = $Node.InstallSharedDir + InstallSharedWOWDir = $Node.InstallSharedWOWDir + UpdateEnabled = $Node.UpdateEnabled + SuppressReboot = $Node.SuppressReboot + ForceReboot = $Node.ForceReboot + RSSvcAccount = New-Object ` + -TypeName System.Management.Automation.PSCredential ` + -ArgumentList @($Node.Service_UserName, (ConvertTo-SecureString -String $Node.Service_Password -AsPlainText -Force)) + + DependsOn = @( + '[WaitForVolume]WaitForMountOfIsoMedia' + '[User]CreateReportingServicesServiceAccount' + '[WindowsFeature]NetFramework45' + ) + + PsDscRunAsCredential = New-Object ` + -TypeName System.Management.Automation.PSCredential ` + -ArgumentList @( + $Node.RunAs_UserName, (ConvertTo-SecureString -String $Node.RunAs_Password -AsPlainText -Force)) + } } } }