From eaa6c1847a77a2d9ed993c84ecf4042bfda75f01 Mon Sep 17 00:00:00 2001 From: Patrick Steinhardt Date: Thu, 17 Dec 2020 15:54:21 +0100 Subject: 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`. --- cmd/gitaly-hooks/hooks_test.go | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) (limited to 'cmd/gitaly-hooks') 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 } -- cgit v1.2.3