fix: add context parameter to route registration functions for improved lifecycle management

This commit is contained in:
GitHub Actions
2026-04-13 14:10:44 +00:00
parent 0391f2b3e3
commit 29c56ab283
8 changed files with 75 additions and 70 deletions

View File

@@ -2,6 +2,7 @@
package tests
import (
"context"
"net/http"
"net/http/httptest"
"strings"
@@ -33,7 +34,7 @@ func TestIntegration_WAF_BlockAndMonitor(t *testing.T) {
}
cfg.Security.WAFMode = mode
r := gin.New()
if err := routes.Register(r, db, cfg); err != nil {
if err := routes.Register(context.Background(), r, db, cfg); err != nil {
t.Fatalf("register: %v", err)
}
return r, db