20457: Exercise quota handling in dispatcher chaos test.
[arvados.git] / lib / dispatchcloud / test / ssh_service.go
index 5fab9572a953858fcc0f9aff7abc4886f5a54c8d..31919b566df81769f791782b4cb3709b468122e8 100644 (file)
@@ -18,6 +18,8 @@ import (
        check "gopkg.in/check.v1"
 )
 
+// LoadTestKey returns a public/private ssh keypair, read from the files
+// identified by the path of the private key.
 func LoadTestKey(c *check.C, fnm string) (ssh.PublicKey, ssh.Signer) {
        rawpubkey, err := ioutil.ReadFile(fnm + ".pub")
        c.Assert(err, check.IsNil)
@@ -109,7 +111,7 @@ func (ss *SSHService) run() {
        }
        config.AddHostKey(ss.HostKey)
 
-       listener, err := net.Listen("tcp", ":")
+       listener, err := net.Listen("tcp", "127.0.0.1:")
        if err != nil {
                ss.err = err
                return