diff --git a/communicator/ssh/communicator_test.go b/communicator/ssh/communicator_test.go index 3f9d4f883..b2344fa55 100644 --- a/communicator/ssh/communicator_test.go +++ b/communicator/ssh/communicator_test.go @@ -381,7 +381,7 @@ func acceptPublicKey(keystr string) func(ssh.ConnMetadata, ssh.PublicKey) (*ssh. panic(fmt.Errorf("error parsing key: %s", err)) } return func(_ ssh.ConnMetadata, inkey ssh.PublicKey) (*ssh.Permissions, error) { - if bytes.Compare(inkey.Marshal(), goodkey.Marshal()) == 0 { + if bytes.Equal(inkey.Marshal(), goodkey.Marshal()) { return nil, nil }