p2p: fix error comparison in TestProtocolHandshakeErrors

This commit is contained in:
Vansh Sahay 2026-06-19 15:05:35 +05:30
parent 4e49b437e3
commit 574f9027ae
No known key found for this signature in database

View file

@ -147,7 +147,7 @@ func TestProtocolHandshakeErrors(t *testing.T) {
p1, p2 := MsgPipe()
go Send(p1, test.code, test.msg)
_, err := readProtocolHandshake(p2)
if !errors.Is(err, test.err) {
if err.Error() != test.err.Error() {
t.Errorf("test %d: error mismatch: got %q, want %q", i, err, test.err)
}
}