From 87075a720191902cfec2ab514a0330ac223aa802 Mon Sep 17 00:00:00 2001 From: Marko Bozikovic Date: Wed, 17 Apr 2019 18:05:16 +0200 Subject: [PATCH] [#864] A fix for SSRS 2017 URLs in integration tests. --- .../MSFT_SqlRS.Integration.Tests.ps1 | 40 +++++++++++++++++-- 1 file changed, 36 insertions(+), 4 deletions(-) diff --git a/Tests/Integration/MSFT_SqlRS.Integration.Tests.ps1 b/Tests/Integration/MSFT_SqlRS.Integration.Tests.ps1 index ed0dd0977..fa94d1ef8 100644 --- a/Tests/Integration/MSFT_SqlRS.Integration.Tests.ps1 +++ b/Tests/Integration/MSFT_SqlRS.Integration.Tests.ps1 @@ -133,7 +133,15 @@ try } It 'Should be able to access the ReportServer site without any error' { - $reportServerUri = 'http://{0}/ReportServer_{1}' -f $env:COMPUTERNAME, $ConfigurationData.AllNodes.InstanceName + if($script:sqlVersion -eq '140') + { + # SSRS 2017 does not support multiple instances + $reportServerUri = 'http://{0}/ReportServer' -f $env:COMPUTERNAME + } + else + { + $reportServerUri = 'http://{0}/ReportServer_{1}' -f $env:COMPUTERNAME, $ConfigurationData.AllNodes.InstanceName + } try { @@ -155,7 +163,15 @@ try } It 'Should be able to access the Reports site without any error' { - $reportsUri = 'http://{0}/Reports_{1}' -f $env:COMPUTERNAME, $ConfigurationData.AllNodes.InstanceName + if($script:sqlVersion -eq '140') + { + # SSRS 2017 does not support multiple instances + $reportsUri = 'http://{0}/Reports' -f $env:COMPUTERNAME + } + else + { + $reportsUri = 'http://{0}/Reports_{1}' -f $env:COMPUTERNAME, $ConfigurationData.AllNodes.InstanceName + } try { @@ -229,7 +245,15 @@ try as this without testing for the correct error message on purpose. #> It 'Should not be able to access the ReportServer site and throw an error message' { - $reportServerUri = 'http://{0}/ReportServer_{1}' -f $env:COMPUTERNAME, $ConfigurationData.AllNodes.InstanceName + if($script:sqlVersion -eq '140') + { + # SSRS 2017 does not support multiple instances + $reportServerUri = 'http://{0}/ReportServer' -f $env:COMPUTERNAME + } + else + { + $reportServerUri = 'http://{0}/ReportServer_{1}' -f $env:COMPUTERNAME, $ConfigurationData.AllNodes.InstanceName + } { Invoke-WebRequest -Uri $reportServerUri -UseDefaultCredentials } | Should -Throw } @@ -281,7 +305,15 @@ try } It 'Should be able to access the ReportServer site without any error' { - $reportServerUri = 'http://{0}/ReportServer_{1}' -f $env:COMPUTERNAME, $ConfigurationData.AllNodes.InstanceName + if($script:sqlVersion -eq '140') + { + # SSRS 2017 does not support multiple instances + $reportServerUri = 'http://{0}/ReportServer' -f $env:COMPUTERNAME + } + else + { + $reportServerUri = 'http://{0}/ReportServer_{1}' -f $env:COMPUTERNAME, $ConfigurationData.AllNodes.InstanceName + } try {