From f4cb81c2dcdfaaa67a2752f7451917f6080db652 Mon Sep 17 00:00:00 2001 From: John Cai Date: Fri, 25 Mar 2022 09:13:53 -0400 Subject: server: Allow multiple limit handlers Now that we are adding a second limit handle, adjust the code to allow for multiple limit handlers to be passed into a server invocation. --- internal/gitaly/service/repository/create_fork_test.go | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) (limited to 'internal/gitaly/service') diff --git a/internal/gitaly/service/repository/create_fork_test.go b/internal/gitaly/service/repository/create_fork_test.go index b3d0ceaa3..22aa1c0da 100644 --- a/internal/gitaly/service/repository/create_fork_test.go +++ b/internal/gitaly/service/repository/create_fork_test.go @@ -260,7 +260,7 @@ func runSecureServer(t *testing.T, cfg config.Cfg, rubySrv *rubyserver.Server) s locator := config.NewLocator(cfg) cache := cache.New(cfg, locator) limitHandler := limithandler.New(cfg, limithandler.LimitConcurrencyByRepo, limithandler.WithConcurrencyLimiters) - server, err := gserver.New(true, cfg, testhelper.NewDiscardingLogEntry(t), registry, cache, limitHandler) + server, err := gserver.New(true, cfg, testhelper.NewDiscardingLogEntry(t), registry, cache, []*limithandler.LimiterMiddleware{limitHandler}) require.NoError(t, err) listener, addr := testhelper.GetLocalhostListener(t) -- cgit v1.2.3