mirror of
https://github.com/XTLS/Xray-core.git
synced 2025-04-29 16:58:34 +00:00
Fix tests (#201)
Co-authored-by: RPRX <63339210+rprx@users.noreply.github.com>
This commit is contained in:
parent
d032a8deb7
commit
4cd343f2d5
7 changed files with 23 additions and 18 deletions
|
@ -45,7 +45,7 @@ func TestUDPEncoding(t *testing.T) {
|
|||
t.Error("data: ", r)
|
||||
}
|
||||
|
||||
if r := cmp.Diff(decodedRequest, request); r != "" {
|
||||
if r := cmp.Diff(decodedRequest, request, cmp.Comparer(func(a1, a2 protocol.Account) bool { return a1.Equals(a2) })); r != "" {
|
||||
t.Error("request: ", r)
|
||||
}
|
||||
}
|
||||
|
@ -119,7 +119,7 @@ func TestTCPRequest(t *testing.T) {
|
|||
|
||||
decodedRequest, reader, err := ReadTCPSession([]*protocol.MemoryUser{request.User}, cache)
|
||||
common.Must(err)
|
||||
if r := cmp.Diff(decodedRequest, request); r != "" {
|
||||
if r := cmp.Diff(decodedRequest, request, cmp.Comparer(func(a1, a2 protocol.Account) bool { return a1.Equals(a2) })); r != "" {
|
||||
t.Error("request: ", r)
|
||||
}
|
||||
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue