From a53e3280a9d00e634944fa53f9efaf9b2e58c0ef Mon Sep 17 00:00:00 2001 From: Yang Hau Date: Tue, 18 Jul 2023 01:29:00 +0530 Subject: [PATCH] fix: Fix potential error in tests --- jwt_test.go | 4 +++- 1 file changed, 3 insertions(+), 1 deletion(-) diff --git a/jwt_test.go b/jwt_test.go index 9f62129..2d49626 100644 --- a/jwt_test.go +++ b/jwt_test.go @@ -282,7 +282,8 @@ func TestJWT_combinations(t *testing.T) { } req = httptest.NewRequest(http.MethodPost, tc.reqURL, strings.NewReader(form.Encode())) req.Header.Set(echo.HeaderContentType, "application/x-www-form-urlencoded") - req.ParseForm() + err := req.ParseForm() + assert.NoError(t, err) } else { req = httptest.NewRequest(http.MethodGet, tc.reqURL, nil) } @@ -853,6 +854,7 @@ func TestDataRacesOnParallelExecution(t *testing.T) { e.Use(mw) for _, tc := range testCases { + tc := tc t.Run(tc.name, func(t *testing.T) { t.Parallel()