0
mirror of https://github.com/XTLS/Xray-core.git synced 2025-06-08 09:53:34 +03:00

Tests: Fix TestCommanderListHandlers (#4789)

This commit is contained in:
Meow 2025-06-07 21:24:39 +08:00 committed by GitHub
parent 97fdcb4228
commit 402067d281
No known key found for this signature in database
GPG Key ID: B5690EEEBB952194

View File

@ -286,8 +286,8 @@ func TestCommanderListHandlers(t *testing.T) {
t.Error("unexpected nil response") t.Error("unexpected nil response")
} }
if !cmp.Equal(inboundResp.Inbounds, clientConfig.Inbound, protocmp.Transform()) { if diff := cmp.Diff(inboundResp.Inbounds, clientConfig.Inbound, protocmp.Transform()); diff != "" {
t.Fatal("inbound response doesn't match config") t.Fatalf("inbound response doesn't match config (-want +got):\n%s", diff)
} }
outboundResp, err := hsClient.ListOutbounds(context.Background(), &command.ListOutboundsRequest{}) outboundResp, err := hsClient.ListOutbounds(context.Background(), &command.ListOutboundsRequest{})
@ -296,8 +296,8 @@ func TestCommanderListHandlers(t *testing.T) {
t.Error("unexpected nil response") t.Error("unexpected nil response")
} }
if !cmp.Equal(outboundResp.Outbounds, clientConfig.Outbound, protocmp.Transform()) { if diff := cmp.Diff(outboundResp.Outbounds, clientConfig.Outbound, protocmp.Transform()); diff != "" {
t.Fatal("outbound response doesn't match config") t.Fatalf("outbound response doesn't match config (-want +got):\n%s", diff)
} }
} }