diff options
author | Patrick Steinhardt <psteinhardt@gitlab.com> | 2021-01-07 11:42:39 +0300 |
---|---|---|
committer | Patrick Steinhardt <psteinhardt@gitlab.com> | 2021-01-12 14:22:48 +0300 |
commit | 43a7a52d4bf9baf8ed28bca44c751afd8a93b843 (patch) | |
tree | 0bf53036362430572d392a4ed887d4f01919407f /client | |
parent | 25ea884b54a3be6f7a9f2dfffb885f29f6104c1f (diff) |
testhelper: Use test context in `GetTemporaryGitalySocketFileName()`
The `testhelper.GetTemporaryGitalySocketFileName()` function currently
returns an error. Given that all callers use `require.NoError()` on that
error, let's convert it to instead receive a `testing.TB` and not return
an error.
Diffstat (limited to 'client')
-rw-r--r-- | client/dial_test.go | 10 |
1 files changed, 5 insertions, 5 deletions
diff --git a/client/dial_test.go b/client/dial_test.go index 41cd02e8f..61b225e8b 100644 --- a/client/dial_test.go +++ b/client/dial_test.go @@ -170,7 +170,7 @@ func (ts *testSvc) PingStream(stream proxytestdata.TestService_PingStreamServer) func TestDial_Correlation(t *testing.T) { t.Run("unary", func(t *testing.T) { - serverSocketPath := testhelper.GetTemporaryGitalySocketFileName() + serverSocketPath := testhelper.GetTemporaryGitalySocketFileName(t) listener, err := net.Listen("unix", serverSocketPath) require.NoError(t, err) @@ -204,7 +204,7 @@ func TestDial_Correlation(t *testing.T) { }) t.Run("stream", func(t *testing.T) { - serverSocketPath := testhelper.GetTemporaryGitalySocketFileName() + serverSocketPath := testhelper.GetTemporaryGitalySocketFileName(t) listener, err := net.Listen("unix", serverSocketPath) require.NoError(t, err) @@ -247,7 +247,7 @@ func TestDial_Correlation(t *testing.T) { func TestDial_Tracing(t *testing.T) { t.Run("unary", func(t *testing.T) { - serverSocketPath := testhelper.GetTemporaryGitalySocketFileName() + serverSocketPath := testhelper.GetTemporaryGitalySocketFileName(t) listener, err := net.Listen("unix", serverSocketPath) require.NoError(t, err) @@ -298,7 +298,7 @@ func TestDial_Tracing(t *testing.T) { }) t.Run("stream", func(t *testing.T) { - serverSocketPath := testhelper.GetTemporaryGitalySocketFileName() + serverSocketPath := testhelper.GetTemporaryGitalySocketFileName(t) listener, err := net.Listen("unix", serverSocketPath) require.NoError(t, err) @@ -389,7 +389,7 @@ func startTCPListener(t testing.TB) (func(), string) { // startUnixListener will start a unix socket listener using a temporary file func startUnixListener(t testing.TB) (func(), string) { - serverSocketPath := testhelper.GetTemporaryGitalySocketFileName() + serverSocketPath := testhelper.GetTemporaryGitalySocketFileName(t) listener, err := net.Listen("unix", serverSocketPath) require.NoError(t, err) |