diff options
author | Patrick Steinhardt <psteinhardt@gitlab.com> | 2020-12-17 17:54:21 +0300 |
---|---|---|
committer | Patrick Steinhardt <psteinhardt@gitlab.com> | 2021-01-06 10:28:38 +0300 |
commit | eaa6c1847a77a2d9ed993c84ecf4042bfda75f01 (patch) | |
tree | 2c0199cbb3a3fb4c7dc9ef9cb8b9c02ecec8d89f /cmd/gitaly-hooks | |
parent | f0df4548be7783523b18feec17ffe238ef6da98f (diff) |
testhelper: Accept `testing.TB` when starting the server
Currently, `TestServer.Start()` returns an error. Given that it's only
used for tests and never inside of the test's main function, let's
convert it to instead receive a `testing.TB` and use `require`.
Diffstat (limited to 'cmd/gitaly-hooks')
-rw-r--r-- | cmd/gitaly-hooks/hooks_test.go | 2 |
1 files changed, 1 insertions, 1 deletions
diff --git a/cmd/gitaly-hooks/hooks_test.go b/cmd/gitaly-hooks/hooks_test.go index 8ae9b9454..0b415273f 100644 --- a/cmd/gitaly-hooks/hooks_test.go +++ b/cmd/gitaly-hooks/hooks_test.go @@ -644,7 +644,7 @@ func runHookServiceServerWithAPI(t *testing.T, gitlabAPI gitalyhook.GitlabAPI) f gitalypb.RegisterHookServiceServer(server.GrpcServer(), hook.NewServer(config.Config, gitalyhook.NewManager(config.NewLocator(config.Config), gitlabAPI, config.Config))) reflection.Register(server.GrpcServer()) - require.NoError(t, server.Start()) + server.Start(t) return server.Stop } |