From 23832e5e95339772a698b9fb3405d43446a607e8 Mon Sep 17 00:00:00 2001 From: Dan Travison Date: Thu, 23 Aug 2018 15:10:39 -0700 Subject: [PATCH] Update 'SSHConnectionInfo Class Tests' $skipTest expression to use collection semantics instead of relying on $null (which causes a type cast exception). (#7610) --- test/powershell/engine/Remoting/SSHRemotingAPI.Tests.ps1 | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/test/powershell/engine/Remoting/SSHRemotingAPI.Tests.ps1 b/test/powershell/engine/Remoting/SSHRemotingAPI.Tests.ps1 index 9c9a0aa7e5..89fe5844e0 100644 --- a/test/powershell/engine/Remoting/SSHRemotingAPI.Tests.ps1 +++ b/test/powershell/engine/Remoting/SSHRemotingAPI.Tests.ps1 @@ -6,7 +6,7 @@ Describe "SSH Remoting API Tests" -Tags "Feature" { BeforeAll { ## Skip the test if ssh is not present. - $skipTest = (Get-Command 'ssh' -CommandType Application -ErrorAction SilentlyContinue) -eq $null + $skipTest = @(Get-Command 'ssh' -CommandType Application -ErrorAction SilentlyContinue).Count -eq 0 } AfterEach {