From 18c841050b4c843ef723e788d4c0a4c29c67ffe3 Mon Sep 17 00:00:00 2001 From: Unknwon Date: Sun, 8 Nov 2015 16:59:56 -0500 Subject: fix 1540 and experimental SSH server support --- modules/crypto/ssh/client_test.go | 39 --------------------------------------- 1 file changed, 39 deletions(-) delete mode 100755 modules/crypto/ssh/client_test.go (limited to 'modules/crypto/ssh/client_test.go') diff --git a/modules/crypto/ssh/client_test.go b/modules/crypto/ssh/client_test.go deleted file mode 100755 index 1fe790cb..00000000 --- a/modules/crypto/ssh/client_test.go +++ /dev/null @@ -1,39 +0,0 @@ -// Copyright 2014 The Go Authors. All rights reserved. -// Use of this source code is governed by a BSD-style -// license that can be found in the LICENSE file. - -package ssh - -import ( - "net" - "testing" -) - -func testClientVersion(t *testing.T, config *ClientConfig, expected string) { - clientConn, serverConn := net.Pipe() - defer clientConn.Close() - receivedVersion := make(chan string, 1) - go func() { - version, err := readVersion(serverConn) - if err != nil { - receivedVersion <- "" - } else { - receivedVersion <- string(version) - } - serverConn.Close() - }() - NewClientConn(clientConn, "", config) - actual := <-receivedVersion - if actual != expected { - t.Fatalf("got %s; want %s", actual, expected) - } -} - -func TestCustomClientVersion(t *testing.T) { - version := "Test-Client-Version-0.0" - testClientVersion(t, &ClientConfig{ClientVersion: version}, version) -} - -func TestDefaultClientVersion(t *testing.T) { - testClientVersion(t, &ClientConfig{}, packageVersion) -} -- cgit v1.2.3