1
// Copyright 2012 The Go Authors. All rights reserved.
2
// Use of this source code is governed by a BSD-style
3
// license that can be found in the LICENSE file.
9
// direct-tcpip functional tests
17
func TestDial(t *testing.T) {
18
server := newServer(t)
19
defer server.Shutdown()
20
sshConn := server.Dial(clientConfig())
23
l, err := net.Listen("tcp", "127.0.0.1:0")
25
t.Fatalf("Listen: %v", err)
36
io.WriteString(c, c.RemoteAddr().String())
41
conn, err := sshConn.Dial("tcp", l.Addr().String())
43
t.Fatalf("Dial: %v", err)