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:
authorJacob Vosmaer (GitLab) <jacob@gitlab.com>2018-01-18 22:58:46 +0300
committerKim Carlbäcker <kim.carlbacker@gmail.com>2018-01-18 22:58:46 +0300
commit76c862ba55eab6047367122665a69562b064a816 (patch)
treeee6aed5d8b2b244b17801f38fc48718cdce1fbc6 /internal/testhelper
parenta613c884192059321f28d17aec5aa811ecad2ffc (diff)
Use grpc-go 1.9.1
Diffstat (limited to 'internal/testhelper')
-rw-r--r--internal/testhelper/testhelper.go4
1 files changed, 3 insertions, 1 deletions
diff --git a/internal/testhelper/testhelper.go b/internal/testhelper/testhelper.go
index 3107824e5..6923ab962 100644
--- a/internal/testhelper/testhelper.go
+++ b/internal/testhelper/testhelper.go
@@ -31,6 +31,7 @@ import (
"google.golang.org/grpc"
"google.golang.org/grpc/codes"
"google.golang.org/grpc/metadata"
+ "google.golang.org/grpc/status"
)
// TestRelativePath is the path inside its storage of the gitlab-test repo
@@ -131,7 +132,8 @@ func AssertGrpcError(t *testing.T, err error, expectedCode codes.Code, containsT
}
// Check that the code matches
- if code := grpc.Code(err); code != expectedCode {
+ status, _ := status.FromError(err)
+ if code := status.Code(); code != expectedCode {
t.Fatalf("Expected an error with code %v, got %v. The error was %v", expectedCode, code, err)
}