diff options
author | Christopher Speller <crspeller@gmail.com> | 2017-05-17 16:51:25 -0400 |
---|---|---|
committer | GitHub <noreply@github.com> | 2017-05-17 16:51:25 -0400 |
commit | d103ed6ca97ca5a2669f6cf5fe4b3d2a9c945f26 (patch) | |
tree | dbde13123c6add150448f7b75753ac022d862475 /vendor/golang.org/x/crypto/ssh/agent | |
parent | cd23b8139a9463b67e3096744321f6f4eb0ca40a (diff) | |
download | chat-d103ed6ca97ca5a2669f6cf5fe4b3d2a9c945f26.tar.gz chat-d103ed6ca97ca5a2669f6cf5fe4b3d2a9c945f26.tar.bz2 chat-d103ed6ca97ca5a2669f6cf5fe4b3d2a9c945f26.zip |
Upgrading server dependancies (#6431)
Diffstat (limited to 'vendor/golang.org/x/crypto/ssh/agent')
-rw-r--r-- | vendor/golang.org/x/crypto/ssh/agent/client_test.go | 13 |
1 files changed, 8 insertions, 5 deletions
diff --git a/vendor/golang.org/x/crypto/ssh/agent/client_test.go b/vendor/golang.org/x/crypto/ssh/agent/client_test.go index 93d3a9cd2..5fc47e577 100644 --- a/vendor/golang.org/x/crypto/ssh/agent/client_test.go +++ b/vendor/golang.org/x/crypto/ssh/agent/client_test.go @@ -180,9 +180,12 @@ func TestCert(t *testing.T) { // therefore is buffered (net.Pipe deadlocks if both sides start with // a write.) func netPipe() (net.Conn, net.Conn, error) { - listener, err := net.Listen("tcp", ":0") + listener, err := net.Listen("tcp", "127.0.0.1:0") if err != nil { - return nil, nil, err + listener, err = net.Listen("tcp", "[::1]:0") + if err != nil { + return nil, nil, err + } } defer listener.Close() c1, err := net.Dial("tcp", listener.Addr().String()) @@ -200,6 +203,9 @@ func netPipe() (net.Conn, net.Conn, error) { } func TestAuth(t *testing.T) { + agent, _, cleanup := startAgent(t) + defer cleanup() + a, b, err := netPipe() if err != nil { t.Fatalf("netPipe: %v", err) @@ -208,9 +214,6 @@ func TestAuth(t *testing.T) { defer a.Close() defer b.Close() - agent, _, cleanup := startAgent(t) - defer cleanup() - if err := agent.Add(AddedKey{PrivateKey: testPrivateKeys["rsa"], Comment: "comment"}); err != nil { t.Errorf("Add: %v", err) } |