ssh: use a variable rather than type for NoAuthError
Change-Id: Ib61e0bc7d953cefde0436f77fe6a610201043c85 Reviewed-on: https://go-review.googlesource.com/96336 Run-TryBot: Han-Wen Nienhuys <hanwen@google.com> TryBot-Result: Gobot Gobot <gobot@golang.org> Reviewed-by: Spencer Tung <spencertung@google.com> Reviewed-by: Han-Wen Nienhuys <hanwen@google.com>
This commit is contained in:
@@ -614,8 +614,8 @@ func TestClientAuthErrorList(t *testing.T) {
|
||||
for i, e := range authErrs.Errors {
|
||||
switch i {
|
||||
case 0:
|
||||
if _, ok := e.(*NoAuthError); !ok {
|
||||
t.Fatalf("errors: got error type %T, want NoAuthError", e)
|
||||
if e != NoAuthError {
|
||||
t.Fatalf("errors: got error %v, want NoAuthError", e)
|
||||
}
|
||||
case 1:
|
||||
if e != publicKeyErr {
|
||||
|
||||
Reference in New Issue
Block a user