Welcome to mirror list, hosted at ThFree Co, Russian Federation.

gitlab.com/gitlab-org/gitaly.git - Unnamed repository; edit this file 'description' to name the repository.
summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
Diffstat (limited to 'internal/testhelper/testhelper.go')
-rw-r--r--internal/testhelper/testhelper.go8
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
+}