diff options
author | Patrick Steinhardt <psteinhardt@gitlab.com> | 2021-12-06 09:49:50 +0300 |
---|---|---|
committer | Patrick Steinhardt <psteinhardt@gitlab.com> | 2021-12-06 09:50:11 +0300 |
commit | ddfe5c04ef463e76b5b021415a915fcc055c2fa7 (patch) | |
tree | f08ded4873af3b2d403e1fd4caaa9d4ce4c70e34 /client | |
parent | 555260f1579aca1dcb8494c0d505971c861b673a (diff) |
testhelper: Absorb helpers from the testassert package
Personally, whenever I want to compare gRPC errors and/or messages, I
stand there asking myself where the helper I want is located again. This
is caused by a split we have in test helpers related to gRPC: while we
do have `testhelper.RequireGrpcError()`, checking for actual errors is
done via `testassert.GrpcEqualErr()`. I always have to look up which of
both does what and where it's located.
Fix this by absorbing the helpers from the testassert package into the
testhelper package.
Diffstat (limited to 'client')
-rw-r--r-- | client/dial_test.go | 3 |
1 files changed, 1 insertions, 2 deletions
diff --git a/client/dial_test.go b/client/dial_test.go index d7231f4a0..5229c178a 100644 --- a/client/dial_test.go +++ b/client/dial_test.go @@ -19,7 +19,6 @@ import ( gitalyauth "gitlab.com/gitlab-org/gitaly/v14/auth" proxytestdata "gitlab.com/gitlab-org/gitaly/v14/internal/praefect/grpc-proxy/testdata" "gitlab.com/gitlab-org/gitaly/v14/internal/testhelper" - "gitlab.com/gitlab-org/gitaly/v14/internal/testhelper/testassert" gitalyx509 "gitlab.com/gitlab-org/gitaly/v14/internal/x509" "gitlab.com/gitlab-org/labkit/correlation" grpccorrelation "gitlab.com/gitlab-org/labkit/correlation/grpc" @@ -633,7 +632,7 @@ func TestHealthCheckDialer(t *testing.T) { defer cancel() _, err := HealthCheckDialer(DialContext)(ctx, addr, nil) - testassert.GrpcEqualErr(t, status.Error(codes.Unauthenticated, "authentication required"), err) + testhelper.GrpcEqualErr(t, status.Error(codes.Unauthenticated, "authentication required"), err) cc, err := HealthCheckDialer(DialContext)(ctx, addr, []grpc.DialOption{grpc.WithPerRPCCredentials(gitalyauth.RPCCredentialsV2("token"))}) require.NoError(t, err) |