diff options
Diffstat (limited to 'internal/testhelper/testhelper.go')
-rw-r--r-- | internal/testhelper/testhelper.go | 8 |
1 files changed, 8 insertions, 0 deletions
diff --git a/internal/testhelper/testhelper.go b/internal/testhelper/testhelper.go index a052c5119..5d7d0647a 100644 --- a/internal/testhelper/testhelper.go +++ b/internal/testhelper/testhelper.go @@ -590,3 +590,11 @@ func getGitDirSize(t *testing.T, repoPath string, subdirs ...string) int64 { return blocks } + +func GrpcErrorHasMessage(grpcError error, msg string) bool { + status, ok := status.FromError(grpcError) + if !ok { + return false + } + return status.Message() == msg +} |