From 565f245c89928fb21846ada5ebcd965ff4bd7d01 Mon Sep 17 00:00:00 2001 From: Flc Date: Sun, 31 Aug 2025 16:08:47 +0800 Subject: [PATCH] test: update expected status code for request too large test Signed-off-by: Flc --- context_test.go | 5 ++--- 1 file changed, 2 insertions(+), 3 deletions(-) diff --git a/context_test.go b/context_test.go index f51c147f..ef09eef7 100644 --- a/context_test.go +++ b/context_test.go @@ -1991,13 +1991,12 @@ func TestContextContentType(t *testing.T) { } func TestContextBindRequestTooLarge(t *testing.T) { - // When using sonic or go-json as JSON encoder, they do not propagate the http.MaxBytesError error + // When using go-json as JSON encoder, they do not propagate the http.MaxBytesError error // The response will fail with a generic 400 instead of 413 // https://github.com/goccy/go-json/issues/485 - // https://github.com/bytedance/sonic/issues/800 var expectedCode int switch json.Package { - case "github.com/goccy/go-json", "github.com/bytedance/sonic": + case "github.com/goccy/go-json": expectedCode = http.StatusBadRequest default: expectedCode = http.StatusRequestEntityTooLarge