X-Git-Url: https://git.arvados.org/arvados.git/blobdiff_plain/7499f61a2912cfdb1a316808fafa6e6ee77ee2e0..e44725a3792df227f189f88ffb2cd1dbf0e93489:/lib/dispatchcloud/sshexecutor/executor_test.go diff --git a/lib/dispatchcloud/sshexecutor/executor_test.go b/lib/dispatchcloud/sshexecutor/executor_test.go index b4afeafa82..95b29fa6ac 100644 --- a/lib/dispatchcloud/sshexecutor/executor_test.go +++ b/lib/dispatchcloud/sshexecutor/executor_test.go @@ -6,6 +6,7 @@ package sshexecutor import ( "bytes" + "errors" "fmt" "io" "io/ioutil" @@ -146,6 +147,7 @@ func (s *ExecutorSuite) TestExecute(c *check.C) { exr.SetTargetPort("0") _, _, err = exr.Execute(nil, command, nil) c.Check(err, check.ErrorMatches, `.*connection refused.*`) + c.Check(errors.As(err, new(*net.OpError)), check.Equals, true) // Use the test server's listening port. exr.SetTargetPort(target.Port())