import (
"bytes"
+ "errors"
"fmt"
"io"
"io/ioutil"
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())