From 4d04c972e8fc1b4716611e643bfa56d335de3f3f Mon Sep 17 00:00:00 2001 From: Jerome Amon Date: Mon, 13 Nov 2023 01:42:48 +0100 Subject: [PATCH] test(router): update unit test on feching all books --- tests.router_test.go | 4 +++- 1 file changed, 3 insertions(+), 1 deletion(-) diff --git a/tests.router_test.go b/tests.router_test.go index 9643f40..dc2b4ad 100644 --- a/tests.router_test.go +++ b/tests.router_test.go @@ -6,6 +6,7 @@ import ( "net/http" "net/http/httptest" "testing" + "time" "github.com/julienschmidt/httprouter" "github.com/stretchr/testify/assert" @@ -96,7 +97,8 @@ func TestSetupBookRoutes(t *testing.T) { } bs := NewBookService(zap.NewNop(), nil, NewMockClocker(), mockRepo, mockRepo, mockQueue) - api := NewAPIHandler(zap.NewNop(), nil, &Statistics{started: NewMockClocker().Now()}, NewMockClocker(), NewMockUIDHandler("", true), bs) + api := NewAPIHandler(zap.NewNop(), &Config{}, &Statistics{started: NewMockClocker().Now()}, NewMockClocker(), NewMockUIDHandler("", true), bs) + api.config.Server.LongRequestWriteTimeout = time.Second router := httprouter.New() m := &MiddlewareMap{public: (&Middlewares{}).Chain, ops: (&Middlewares{}).Chain} api.SetupBookRoutes(router, m)