From 4d424cc3865288913a83482ef11806350f09731a Mon Sep 17 00:00:00 2001 From: Johan Ljunggren Date: Sat, 6 May 2023 09:01:11 +0200 Subject: [PATCH] Fix failing test --- tests/Integration/DSC_SqlSetup.config.ps1 | 16 ++++++++++++---- 1 file changed, 12 insertions(+), 4 deletions(-) diff --git a/tests/Integration/DSC_SqlSetup.config.ps1 b/tests/Integration/DSC_SqlSetup.config.ps1 index 5f9686bceb..492b0a6c94 100644 --- a/tests/Integration/DSC_SqlSetup.config.ps1 +++ b/tests/Integration/DSC_SqlSetup.config.ps1 @@ -198,6 +198,16 @@ else } } +# Do not use the feature flag AnalysisServicesConnection when running tests with SQLPS. +$featureFlag = if ((Get-Module -Name 'SqlServer', 'dbatools' -ListAvailable)) +{ + @('AnalysisServicesConnection') +} +else +{ + @() +} + <# Creating all the credential objects to save some repeating code. #> @@ -691,8 +701,7 @@ Configuration DSC_SqlSetup_InstallMultiDimensionalAnalysisServicesAsSystem_Confi { SqlSetup 'Integration_Test' { - # Do not use the feature flag AnalysisServicesConnection when running tests with SQLPS. - FeatureFlag = if ((Get-Module -Name 'SqlServer', 'dbatools' -ListAvailable)) { @('AnalysisServicesConnection') } else { @() }; + FeatureFlag = [System.String[]] $featureFlag InstanceName = $Node.AnalysisServicesMultiInstanceName Features = $Node.AnalysisServicesMultiFeatures @@ -746,8 +755,7 @@ Configuration DSC_SqlSetup_InstallTabularAnalysisServicesAsSystem_Config { SqlSetup 'Integration_Test' { - # Do not use the feature flag AnalysisServicesConnection when running tests with SQLPS. - FeatureFlag = if ((Get-Module -Name 'SqlServer', 'dbatools' -ListAvailable)) { @('AnalysisServicesConnection') } else { @() }; + FeatureFlag = [System.String[]] $featureFlag InstanceName = $Node.AnalysisServicesTabularInstanceName Features = $Node.AnalysisServicesTabularFeatures