From abd9627db8be742aa130878f433e0405f2f953d6 Mon Sep 17 00:00:00 2001 From: Yelshat Duskaliyev Date: Mon, 11 Mar 2024 11:56:59 +0500 Subject: [PATCH] fix: test --- Taskfile.yml | 5 +++++ pkg/proxy/middleware/middleware_test.go | 2 +- 2 files changed, 6 insertions(+), 1 deletion(-) diff --git a/Taskfile.yml b/Taskfile.yml index a6327cd..056a01d 100644 --- a/Taskfile.yml +++ b/Taskfile.yml @@ -6,6 +6,11 @@ env: GO_MODULE: github.com/Semior001/groxy tasks: + lint: + desc: "lint" + cmds: + - golangci-lint run --config=.golangci.yml --timeout=5m ./... + gen: desc: "generate all" deps: diff --git a/pkg/proxy/middleware/middleware_test.go b/pkg/proxy/middleware/middleware_test.go index 247ad3f..e6dc08e 100644 --- a/pkg/proxy/middleware/middleware_test.go +++ b/pkg/proxy/middleware/middleware_test.go @@ -38,7 +38,7 @@ func TestAppInfo(t *testing.T) { func TestRecoverer(t *testing.T) { bts := bytes.NewBuffer(nil) slog.SetDefault(slog.New(slog.NewTextHandler(bts, &slog.HandlerOptions{}))) - mw := Recoverer(func(_ any, _ grpc.ServerStream) error { panic("test") }) + mw := Recoverer()(func(_ any, _ grpc.ServerStream) error { panic("test") }) var err error require.NotPanics(t, func() { err = mw(nil, &mocks.ServerStreamMock{