all: fix warning flagging the use of DeepEqual on error (#23624)
* core: fix warning flagging the use of DeepEqual on error * apply the same change everywhere possible * revert change that was committed by mistake * fix build error * Update config.go * revert changes to ConfigCompatError * review feedback Co-authored-by: Felix Lange <fjl@twurst.com>
This commit is contained in:
@ -18,13 +18,13 @@ package rpc
|
||||
|
||||
import (
|
||||
"context"
|
||||
"errors"
|
||||
"io"
|
||||
"net"
|
||||
"net/http"
|
||||
"net/http/httptest"
|
||||
"net/http/httputil"
|
||||
"net/url"
|
||||
"reflect"
|
||||
"strings"
|
||||
"sync/atomic"
|
||||
"testing"
|
||||
@ -69,7 +69,7 @@ func TestWebsocketOriginCheck(t *testing.T) {
|
||||
t.Fatal("no error for wrong origin")
|
||||
}
|
||||
wantErr := wsHandshakeError{websocket.ErrBadHandshake, "403 Forbidden"}
|
||||
if !reflect.DeepEqual(err, wantErr) {
|
||||
if !errors.Is(err, wantErr) {
|
||||
t.Fatalf("wrong error for wrong origin: %q", err)
|
||||
}
|
||||
|
||||
|
Reference in New Issue
Block a user