aboutsummaryrefslogtreecommitdiffstats
path: root/logging/http/http_test.go
diff options
context:
space:
mode:
Diffstat (limited to 'logging/http/http_test.go')
-rw-r--r--logging/http/http_test.go4
1 files changed, 3 insertions, 1 deletions
diff --git a/logging/http/http_test.go b/logging/http/http_test.go
index 26e5974..832b49e 100644
--- a/logging/http/http_test.go
+++ b/logging/http/http_test.go
@@ -7,6 +7,7 @@ import (
"net/url"
"testing"
+ "go.sudomsg.com/kit/logging"
httpHandler "go.sudomsg.com/kit/logging/http"
"go.sudomsg.com/kit/logging/test"
)
@@ -65,9 +66,10 @@ func TestNew(t *testing.T) {
logger := slog.New(log)
- handler := httpHandler.New(tt.handler, logger)
+ handler := httpHandler.New(tt.handler)
r := httptest.NewRequest(tt.method, tt.url, nil)
+ r = r.WithContext(logging.WithLogger(r.Context(), logger))
w := httptest.NewRecorder()
handler.ServeHTTP(w, r)