diff options
author | Patrick Steinhardt <psteinhardt@gitlab.com> | 2021-12-06 09:50:54 +0300 |
---|---|---|
committer | Patrick Steinhardt <psteinhardt@gitlab.com> | 2021-12-06 09:50:54 +0300 |
commit | 4cacba036ead2988678c861d741f6110a15be551 (patch) | |
tree | e528caa53c70b99e0364a685821062abd348fee9 /cmd | |
parent | 575d77c93d929d80401851c0e587a2f8c2212797 (diff) |
testhelper: Rename `GrpcEqualErr()` to `RequireGrpcError()`
The naming of the `GrpcEqualErr()` helper function is quite irregular
compared to other helper functions we have. Most importantly, it's
significantly different from `RequireGrpcCode()` and may thus be easy to
miss.
Rename it to `RequireGrpcError()` to clarify this.
Diffstat (limited to 'cmd')
-rw-r--r-- | cmd/praefect/subcmd_metadata_test.go | 2 | ||||
-rw-r--r-- | cmd/praefect/subcmd_set_replication_factor_test.go | 2 |
2 files changed, 2 insertions, 2 deletions
diff --git a/cmd/praefect/subcmd_metadata_test.go b/cmd/praefect/subcmd_metadata_test.go index dcc655feb..dc5cd2b60 100644 --- a/cmd/praefect/subcmd_metadata_test.go +++ b/cmd/praefect/subcmd_metadata_test.go @@ -91,7 +91,7 @@ func TestMetadataSubcommand(t *testing.T) { fs := cmd.FlagSet() require.NoError(t, fs.Parse(tc.args)) err := cmd.Exec(fs, config.Config{SocketPath: ln.Addr().String()}) - testhelper.GrpcEqualErr(t, tc.error, err) + testhelper.RequireGrpcError(t, tc.error, err) if tc.error != nil { return } diff --git a/cmd/praefect/subcmd_set_replication_factor_test.go b/cmd/praefect/subcmd_set_replication_factor_test.go index c5c934a3c..6e0d0e3e0 100644 --- a/cmd/praefect/subcmd_set_replication_factor_test.go +++ b/cmd/praefect/subcmd_set_replication_factor_test.go @@ -106,7 +106,7 @@ func TestSetReplicationFactorSubcommand(t *testing.T) { err := cmd.Exec(fs, config.Config{ SocketPath: ln.Addr().String(), }) - testhelper.GrpcEqualErr(t, tc.error, err) + testhelper.RequireGrpcError(t, tc.error, err) require.Equal(t, tc.stdout, stdout.String()) }) } |