diff options
author | Marc Pervaz Boocha <mboocha@sudomsg.com> | 2025-08-07 22:54:36 +0530 |
---|---|---|
committer | Marc Pervaz Boocha <mboocha@sudomsg.com> | 2025-08-07 22:54:36 +0530 |
commit | ae4b37bb136397ca4631ed39526b8156622f285b (patch) | |
tree | 50ff0b8df3ed2b0189929a9d127c9cbdd7f75d79 /logging/http/http_test.go | |
parent | Fixed Complience of slog test handler (diff) | |
download | kit-ae4b37bb136397ca4631ed39526b8156622f285b.tar kit-ae4b37bb136397ca4631ed39526b8156622f285b.tar.gz kit-ae4b37bb136397ca4631ed39526b8156622f285b.tar.bz2 kit-ae4b37bb136397ca4631ed39526b8156622f285b.tar.lz kit-ae4b37bb136397ca4631ed39526b8156622f285b.tar.xz kit-ae4b37bb136397ca4631ed39526b8156622f285b.tar.zst kit-ae4b37bb136397ca4631ed39526b8156622f285b.zip |
Removed the extra logger arguement from http
Diffstat (limited to '')
-rw-r--r-- | logging/http/http_test.go | 4 |
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) |