diff options
author | Pavlo Strokov <pstrokov@gitlab.com> | 2022-08-20 11:20:02 +0300 |
---|---|---|
committer | Pavlo Strokov <pstrokov@gitlab.com> | 2022-08-22 16:44:19 +0300 |
commit | d1c2f5d0f0459a6cf7c4bd52bc93cc857f2d81b6 (patch) | |
tree | 807bdc6297bc8257bdd936a1e3787d19f122cc60 | |
parent | b9e607f9bf82defc2b57dacdbc31a1faa2257270 (diff) |
server factory: Drop unneeded limit middleware
The LimiterMiddleware is not the main subject to test. It makes test
harder to read and understand. It also adds additional functionality
we don't want to test here. We drop it to remove all those concerns.
-rw-r--r-- | internal/gitaly/server/server_factory_test.go | 11 |
1 files changed, 5 insertions, 6 deletions
diff --git a/internal/gitaly/server/server_factory_test.go b/internal/gitaly/server/server_factory_test.go index 5959a6910..744c9ce65 100644 --- a/internal/gitaly/server/server_factory_test.go +++ b/internal/gitaly/server/server_factory_test.go @@ -20,7 +20,6 @@ import ( "gitlab.com/gitlab-org/gitaly/v15/internal/bootstrap/starter" "gitlab.com/gitlab-org/gitaly/v15/internal/cache" "gitlab.com/gitlab-org/gitaly/v15/internal/gitaly/config" - "gitlab.com/gitlab-org/gitaly/v15/internal/middleware/limithandler" "gitlab.com/gitlab-org/gitaly/v15/internal/testhelper" "gitlab.com/gitlab-org/gitaly/v15/internal/testhelper/testcfg" "google.golang.org/grpc" @@ -96,7 +95,7 @@ func TestGitalyServerFactory(t *testing.T) { testhelper.NewDiscardingLogEntry(t), backchannel.NewRegistry(), cache.New(cfg, config.NewLocator(cfg)), - []*limithandler.LimiterMiddleware{limithandler.New(cfg, limithandler.LimitConcurrencyByRepo, limithandler.WithConcurrencyLimiters)}, + nil, ) checkHealth(t, sf, starter.TCP, "localhost:0") @@ -115,7 +114,7 @@ func TestGitalyServerFactory(t *testing.T) { testhelper.NewDiscardingLogEntry(t), backchannel.NewRegistry(), cache.New(cfg, config.NewLocator(cfg)), - []*limithandler.LimiterMiddleware{limithandler.New(cfg, limithandler.LimitConcurrencyByRepo, limithandler.WithConcurrencyLimiters)}, + nil, ) t.Cleanup(sf.Stop) @@ -129,7 +128,7 @@ func TestGitalyServerFactory(t *testing.T) { testhelper.NewDiscardingLogEntry(t), backchannel.NewRegistry(), cache.New(cfg, config.NewLocator(cfg)), - []*limithandler.LimiterMiddleware{limithandler.New(cfg, limithandler.LimitConcurrencyByRepo, limithandler.WithConcurrencyLimiters)}, + nil, ) t.Cleanup(sf.Stop) @@ -159,7 +158,7 @@ func TestGitalyServerFactory(t *testing.T) { logger.WithContext(ctx), backchannel.NewRegistry(), cache.New(cfg, config.NewLocator(cfg)), - []*limithandler.LimiterMiddleware{limithandler.New(cfg, limithandler.LimitConcurrencyByRepo, limithandler.WithConcurrencyLimiters)}, + nil, ) checkHealth(t, sf, starter.TCP, "localhost:0") @@ -193,7 +192,7 @@ func TestGitalyServerFactory_closeOrder(t *testing.T) { testhelper.NewDiscardingLogEntry(t), backchannel.NewRegistry(), cache.New(cfg, config.NewLocator(cfg)), - []*limithandler.LimiterMiddleware{limithandler.New(cfg, limithandler.LimitConcurrencyByRepo, limithandler.WithConcurrencyLimiters)}, + nil, ) defer sf.Stop() |