From 970cf0f5aab8a9bc26b0bbe214a59da3549d212c Mon Sep 17 00:00:00 2001 From: Johan Ljunggren Date: Mon, 11 Sep 2017 22:00:04 +0200 Subject: [PATCH] Changes to xSQLServerSetup - Fixed so integration test does not write warnings when SQLPS module is loaded (issue #798). --- CHANGELOG.md | 2 ++ appveyor.yml | 14 +++++++++++++- 2 files changed, 15 insertions(+), 1 deletion(-) diff --git a/CHANGELOG.md b/CHANGELOG.md index f1b531f774..d3363db23f 100644 --- a/CHANGELOG.md +++ b/CHANGELOG.md @@ -22,6 +22,8 @@ - Fixed so that the integration test renames back the SQLPS module folders if they was renamed by AppVeyor (in the appveyor.yml file). ([issue #774](https://github.com/PowerShell/xFailOverCluster/issues/774)). + - Fixed so integration test does not write warnings when SQLPS module is loaded + ([issue #798](https://github.com/PowerShell/xFailOverCluster/issues/798)). - Changes to xSQLServerAlwaysOnAvailabilityGroup - Change the check of the values entered as parameter for BasicAvailabilityGroup. It is a boolean, hence it was not possible to diff --git a/appveyor.yml b/appveyor.yml index 0de0494779..746712834c 100644 --- a/appveyor.yml +++ b/appveyor.yml @@ -30,7 +30,19 @@ test_script: Write-Verbose ('Renaming ''{0}'' to ''..\{1}''' -f $_, $newFolderName) -Verbose Rename-Item $_ -NewName $newFolderName -Force } - Write-Verbose -Message '---------------------------------' -Verbose + + Write-Verbose -Message '' -Verbose + + # Workaround for issue #798 + Write-Verbose -Message '--- WORKAROUND FOR ISSUE #798 ---' -Verbose + $azureModules = Get-Module -ListAvailable -Name 'Azure*' + $azureUniqueModulePath = Split-Path -Path (Split-Path $sqlModules.Path -Parent) -Parent | Sort-Object -Unique + $azureUniqueModulePath | ForEach-Object -Process { + $newFolderName = '{0}.old' -f (Split-Path -Path $_ -Leaf) + Write-Verbose ('Renaming ''{0}'' to ''..\{1}''' -f $_, $newFolderName) -Verbose + Rename-Item $_ -NewName $newFolderName -Force + } + Write-Verbose -Message '' -Verbose Invoke-AppveyorTestScriptTask -CodeCoverage -CodeCovIo -ExcludeTag @() -RunTestInOrder