Skip to content

Commit

Permalink
[dsccommunity#864] SSRS 2017 integration tests, another try
Browse files Browse the repository at this point in the history
  • Loading branch information
bozho committed May 6, 2019
1 parent 58e7169 commit 3575f8a
Showing 1 changed file with 31 additions and 26 deletions.
57 changes: 31 additions & 26 deletions Tests/Integration/MSFT_SqlRS.config.ps1
Original file line number Diff line number Diff line change
Expand Up @@ -21,11 +21,13 @@ else
{
# SQL2017
$instanceName = 'SSRS'
$isoImageName = 'SQL2017.iso'
}
else
{
# SQL2016
$instanceName = 'DSCRS2016'
$isoImageName = 'SQL2016.iso'
}

$ConfigurationData = @{
Expand All @@ -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
Expand Down Expand Up @@ -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))
}
}
}
}
Expand Down

0 comments on commit 3575f8a

Please sign in to comment.