From fe5328006dd6225ab9999c348b9286e0da988627 Mon Sep 17 00:00:00 2001 From: Andrew Schwartzmeyer Date: Thu, 12 May 2016 14:12:42 -0700 Subject: [PATCH] Fix Import-Alias tests --- test/powershell/Import-Alias.Tests.ps1 | 6 ++++-- 1 file changed, 4 insertions(+), 2 deletions(-) diff --git a/test/powershell/Import-Alias.Tests.ps1 b/test/powershell/Import-Alias.Tests.ps1 index f47b493a4e..62e2f7a650 100644 --- a/test/powershell/Import-Alias.Tests.ps1 +++ b/test/powershell/Import-Alias.Tests.ps1 @@ -21,7 +21,8 @@ Describe "Import-Alias DRT Unit Tests" -Tags DRT{ Remove-Item -Path $testAliasDirectory -Recurse -Force } - It "Import-Alias Resolve To Multiple will throw PSInvalidOperationException" { + It "Import-Alias Resolve To Multiple will throw PSInvalidOperationException" { + $ErrorActionPreference = "Stop" try { Import-Alias * Throw "Execution OK" @@ -31,7 +32,8 @@ Describe "Import-Alias DRT Unit Tests" -Tags DRT{ } } - It "Import-Alias From Exported Alias File Aliases Already Exist should throw SessionStateException skip now as bug#777" -Skip:$true{ + It "Import-Alias From Exported Alias File Aliases Already Exist should throw SessionStateException" { + $ErrorActionPreference = "Stop" {Export-Alias $fulltestpath abcd*}| Should Not Throw try { Import-Alias $fulltestpath