diff options
author | Patrick Steinhardt <psteinhardt@gitlab.com> | 2021-12-01 12:31:52 +0300 |
---|---|---|
committer | Patrick Steinhardt <psteinhardt@gitlab.com> | 2021-12-01 14:55:28 +0300 |
commit | 445d80ef0ea8aca7f5d5d0c283374ee3f02442ca (patch) | |
tree | aa6bb165ec39e8121c121390d3b3bd2ab97e39ae /internal/gitaly/server/auth_test.go | |
parent | ef537ec502fe003fb9ae02ff24611b842fedb54f (diff) |
testhelper: Improve creation of loggers
The testhelper has functions to create test loggers for us. These are
awkardly named though, and furthermore we have a global variable which
contains a reference to one of the functions which creates the logger
for us, which is bad design. Furthermore, this global variable isn't
modified by anything anymore, making it essentially the same as the
function it's aliasing.
Rename functions to match Go best practices and remove the global
variable.
Diffstat (limited to 'internal/gitaly/server/auth_test.go')
-rw-r--r-- | internal/gitaly/server/auth_test.go | 4 |
1 files changed, 2 insertions, 2 deletions
diff --git a/internal/gitaly/server/auth_test.go b/internal/gitaly/server/auth_test.go index 4720ba4a2..3adea10e8 100644 --- a/internal/gitaly/server/auth_test.go +++ b/internal/gitaly/server/auth_test.go @@ -201,7 +201,7 @@ func runServer(t *testing.T, cfg config.Cfg) string { t.Cleanup(catfileCache.Stop) diskCache := cache.New(cfg, locator) - srv, err := New(false, cfg, testhelper.DiscardTestEntry(t), registry, diskCache) + srv, err := New(false, cfg, testhelper.NewDiscardingLogEntry(t), registry, diskCache) require.NoError(t, err) setup.RegisterAll(srv, &service.Dependencies{ @@ -235,7 +235,7 @@ func runSecureServer(t *testing.T, cfg config.Cfg) string { conns := client.NewPool() t.Cleanup(func() { conns.Close() }) - srv, err := New(true, cfg, testhelper.DiscardTestEntry(t), backchannel.NewRegistry(), cache.New(cfg, config.NewLocator(cfg))) + srv, err := New(true, cfg, testhelper.NewDiscardingLogEntry(t), backchannel.NewRegistry(), cache.New(cfg, config.NewLocator(cfg))) require.NoError(t, err) healthpb.RegisterHealthServer(srv, health.NewServer()) |