Merge branch 'github-pr-223'
[arvados.git] / lib / dispatchcloud / sshexecutor / executor_test.go
index b4afeafa82dab3e671f48802646df185d8a64590..95b29fa6aceb3420732dc55aef8a213ce8a756f7 100644 (file)
@@ -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())