fixing TestServerSetupConn

We can't pass errProtoHandshakeError here, because the framework uses
`Is` for testing, and that would need `As`. We can however test how
it works for internal errors, which is the most typical case.

Signed-off-by: Csaba Kiraly <csaba.kiraly@gmail.com>
This commit is contained in:
Csaba Kiraly 2025-04-15 08:32:10 +02:00
parent b7626f02ab
commit f724db56a3
No known key found for this signature in database
GPG key ID: 0FE274EE8C95166E

View file

@ -410,11 +410,11 @@ func TestServerSetupConn(t *testing.T) {
wantCloseErr: DiscUnexpectedIdentity,
},
{
tt: &setupTransport{pubkey: clientpub, protoHandshakeErr: errProtoHandshakeError},
tt: &setupTransport{pubkey: clientpub, protoHandshakeErr: DiscTooManyPeers},
dialDest: enode.NewV4(clientpub, nil, 0, 0),
flags: dynDialedConn,
wantCalls: "doEncHandshake,doProtoHandshake,close,",
wantCloseErr: errProtoHandshakeError,
wantCloseErr: DiscTooManyPeers,
},
{
tt: &setupTransport{pubkey: srvpub, phs: protoHandshake{ID: crypto.FromECDSAPub(srvpub)[1:]}},