From fab25c5d509b19dee7340ffc49811fdd5ddb9557 Mon Sep 17 00:00:00 2001 From: Sergei Vorobev Date: Mon, 9 Jan 2017 18:05:30 -0800 Subject: [PATCH] Remove -Force from Import-Module in tests --- .../Language/Classes/Scripting.Classes.BasicParsing.Tests.ps1 | 2 +- test/powershell/Language/Parser/Parsing.Tests.ps1 | 2 +- .../powershell/Language/Scripting/Debugging/Debugging.Tests.ps1 | 2 +- .../Scripting/NativeExecution/NativeCommandProcessor.Tests.ps1 | 2 +- test/powershell/Modules/PowerShellGet/PowerShellGet.Tests.ps1 | 2 +- test/tools/CodeCoverageAutomation/Start-CodeCoverageRun.ps1 | 2 +- 6 files changed, 6 insertions(+), 6 deletions(-) diff --git a/test/powershell/Language/Classes/Scripting.Classes.BasicParsing.Tests.ps1 b/test/powershell/Language/Classes/Scripting.Classes.BasicParsing.Tests.ps1 index 0279510c5d..323bd4f3db 100644 --- a/test/powershell/Language/Classes/Scripting.Classes.BasicParsing.Tests.ps1 +++ b/test/powershell/Language/Classes/Scripting.Classes.BasicParsing.Tests.ps1 @@ -1,7 +1,7 @@ # # Copyright (c) Microsoft Corporation, 2014 # -Import-Module $PSScriptRoot\..\LanguageTestSupport.psm1 -force +Import-Module $PSScriptRoot\..\LanguageTestSupport.psm1 Describe 'Positive Parse Properties Tests' -Tags "CI" { It 'PositiveParsePropertiesTest' { diff --git a/test/powershell/Language/Parser/Parsing.Tests.ps1 b/test/powershell/Language/Parser/Parsing.Tests.ps1 index 51a886e52f..c50a87eeb8 100644 --- a/test/powershell/Language/Parser/Parsing.Tests.ps1 +++ b/test/powershell/Language/Parser/Parsing.Tests.ps1 @@ -1,4 +1,4 @@ -Import-Module $PSScriptRoot\..\LanguageTestSupport.psm1 -force +Import-Module $PSScriptRoot\..\LanguageTestSupport.psm1 set-strictmode -v 2 diff --git a/test/powershell/Language/Scripting/Debugging/Debugging.Tests.ps1 b/test/powershell/Language/Scripting/Debugging/Debugging.Tests.ps1 index 90ed527648..cdfc008891 100644 --- a/test/powershell/Language/Scripting/Debugging/Debugging.Tests.ps1 +++ b/test/powershell/Language/Scripting/Debugging/Debugging.Tests.ps1 @@ -34,7 +34,7 @@ Describe "Breakpoints when set should be hit" -tag "CI" { Describe "It should be possible to reset runspace debugging" -tag "Feature" { BeforeAll { - import-module $helperModule -force + import-module $helperModule $path = setup -pass -f TestScript_2.ps1 -content $script2 $scriptPath = "$testdrive/TestScript_2.ps1" $iss = [initialsessionstate]::CreateDefault2(); diff --git a/test/powershell/Language/Scripting/NativeExecution/NativeCommandProcessor.Tests.ps1 b/test/powershell/Language/Scripting/NativeExecution/NativeCommandProcessor.Tests.ps1 index 7cb4296c08..5b7b553e1f 100644 --- a/test/powershell/Language/Scripting/NativeExecution/NativeCommandProcessor.Tests.ps1 +++ b/test/powershell/Language/Scripting/NativeExecution/NativeCommandProcessor.Tests.ps1 @@ -5,7 +5,7 @@ $helperModule = join-path $common Test.Helpers.psm1 Describe 'native commands lifecycle' -tags 'Feature' { BeforeAll { - Import-Module $helperModule -force + Import-Module $helperModule $powershell = Join-Path -Path $PsHome -ChildPath "powershell" } diff --git a/test/powershell/Modules/PowerShellGet/PowerShellGet.Tests.ps1 b/test/powershell/Modules/PowerShellGet/PowerShellGet.Tests.ps1 index 066838c93f..819c26e710 100644 --- a/test/powershell/Modules/PowerShellGet/PowerShellGet.Tests.ps1 +++ b/test/powershell/Modules/PowerShellGet/PowerShellGet.Tests.ps1 @@ -71,7 +71,7 @@ $PSVersionTable $env:PSModulePath Get-Module -ListAvailable -Name PackageManagement, PowerShellGet -Import-Module PackageManagement -force -verbose +Import-Module PackageManagement -verbose Get-PackageProvider -ListAvailable $repo = Get-PSRepository -ErrorAction SilentlyContinue | diff --git a/test/tools/CodeCoverageAutomation/Start-CodeCoverageRun.ps1 b/test/tools/CodeCoverageAutomation/Start-CodeCoverageRun.ps1 index ceeab7929a..8e36c3ea6e 100644 --- a/test/tools/CodeCoverageAutomation/Start-CodeCoverageRun.ps1 +++ b/test/tools/CodeCoverageAutomation/Start-CodeCoverageRun.ps1 @@ -59,7 +59,7 @@ try Write-LogPassThru -Message "Expansion complete." - Import-Module "$openCoverPath\OpenCover" -force + Import-Module "$openCoverPath\OpenCover" Install-OpenCover -TargetDirectory $openCoverTargetDirectory -force Write-LogPassThru -Message "OpenCover installed."