Skip to content

Commit 9bf846c

Browse files
committed
fix: test cases
1 parent e43c804 commit 9bf846c

6 files changed

Lines changed: 5 additions & 9 deletions

File tree

.github/workflows/linter.yml

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -37,5 +37,5 @@ jobs:
3737
with:
3838
# NOTE: Keep this in sync with the version from .golangci.yml
3939
version: v2.5.0
40-
# NOTE(ldez): temporary workaround
41-
install-mode: goinstall
40+
# # NOTE(ldez): temporary workaround
41+
# install-mode: goinstall

app_test.go

Lines changed: 0 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -2139,7 +2139,6 @@ func Test_App_AddCustomRequestMethod(t *testing.T) {
21392139

21402140
// method name is always uppercase - https://datatracker.ietf.org/doc/html/rfc7231#section-4.1
21412141
require.Len(t, app.stack, len(appMethods))
2142-
require.Len(t, app.stack, len(appMethods))
21432142
require.Equal(t, "TEST", appMethods[len(appMethods)-1])
21442143
}
21452144

middleware/idempotency/idempotency_test.go

Lines changed: 0 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -120,7 +120,6 @@ func Test_Idempotency(t *testing.T) {
120120
var wg sync.WaitGroup
121121
for range 100 {
122122
wg.Go(func() {
123-
defer wg.Done()
124123
assert.Equal(t, "11", doReq(fiber.MethodPost, "/slow", "22222222-2222-2222-2222-222222222222"))
125124
})
126125
}

middleware/logger/tags.go

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -189,7 +189,7 @@ func createTagMap(cfg *Config) map[string]LogFunc {
189189
TagMethod: func(output Buffer, c fiber.Ctx, _ *Data, _ string) (int, error) {
190190
if cfg.enableColors {
191191
colors := c.App().Config().ColorScheme
192-
return fmt.Fprintf(output, "%s%6s%s", methodColor(c.Method(), colors), c.Method(), colors.Reset)
192+
return fmt.Fprintf(output, "%s%s%s", methodColor(c.Method(), colors), c.Method(), colors.Reset)
193193
}
194194
return output.WriteString(c.Method())
195195
},

middleware/session/session_test.go

Lines changed: 0 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -1422,8 +1422,6 @@ func Test_Session_Concurrency(t *testing.T) {
14221422
// Start numGoroutines goroutines
14231423
for range numGoroutines {
14241424
wg.Go(func() {
1425-
defer wg.Done()
1426-
14271425
localCtx := app.AcquireCtx(&fasthttp.RequestCtx{})
14281426

14291427
sess, err := store.getSession(localCtx)

prefork_test.go

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -95,11 +95,11 @@ func Test_App_Prefork_Child_Process_Never_Show_Startup_Message(t *testing.T) {
9595
func setupIsChild(t *testing.T) {
9696
t.Helper()
9797

98-
require.NoError(t, os.Setenv(envPreforkChildKey, envPreforkChildVal)) //nolint:tenv // Ignore error
98+
require.NoError(t, os.Setenv(envPreforkChildKey, envPreforkChildVal))
9999
}
100100

101101
func teardownIsChild(t *testing.T) {
102102
t.Helper()
103103

104-
require.NoError(t, os.Setenv(envPreforkChildKey, "")) //nolint:tenv // Ignore error
104+
require.NoError(t, os.Setenv(envPreforkChildKey, ""))
105105
}

0 commit comments

Comments
 (0)