ssh: remove testing.T from ExampleRetryableAuthMethod
Change-Id: I9cb821827b16d60b0a8c4fff9caec78748f3a495 Reviewed-on: https://go-review.googlesource.com/c/crypto/+/171677 Reviewed-by: Brad Fitzpatrick <bradfitz@golang.org>
This commit is contained in:
+13
-3
@@ -10,6 +10,8 @@ import (
|
||||
"errors"
|
||||
"fmt"
|
||||
"io"
|
||||
"log"
|
||||
"net"
|
||||
"os"
|
||||
"strings"
|
||||
"testing"
|
||||
@@ -477,7 +479,7 @@ func TestRetryableAuth(t *testing.T) {
|
||||
}
|
||||
}
|
||||
|
||||
func ExampleRetryableAuthMethod(t *testing.T) {
|
||||
func ExampleRetryableAuthMethod() {
|
||||
user := "testuser"
|
||||
NumberOfPrompts := 3
|
||||
|
||||
@@ -495,9 +497,17 @@ func ExampleRetryableAuthMethod(t *testing.T) {
|
||||
},
|
||||
}
|
||||
|
||||
if err := tryAuth(t, config); err != nil {
|
||||
t.Fatalf("unable to dial remote side: %s", err)
|
||||
host := "mysshserver"
|
||||
netConn, err := net.Dial("tcp", host)
|
||||
if err != nil {
|
||||
log.Fatal(err)
|
||||
}
|
||||
|
||||
sshConn, _, _, err := NewClientConn(netConn, host, config)
|
||||
if err != nil {
|
||||
log.Fatal(err)
|
||||
}
|
||||
_ = sshConn
|
||||
}
|
||||
|
||||
// Test if username is received on server side when NoClientAuth is used
|
||||
|
||||
Reference in New Issue
Block a user