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/git/catfile/commit_test.go')
-rw-r--r--internal/git/catfile/commit_test.go7
1 files changed, 5 insertions, 2 deletions
diff --git a/internal/git/catfile/commit_test.go b/internal/git/catfile/commit_test.go
index 55d6012d9..d4a51457e 100644
--- a/internal/git/catfile/commit_test.go
+++ b/internal/git/catfile/commit_test.go
@@ -55,8 +55,11 @@ func TestGetCommit(t *testing.T) {
} {
t.Run(tc.desc, func(t *testing.T) {
commit, err := GetCommit(ctx, objectReader, git.Revision(tc.revision))
- require.Equal(t, tc.expectedErr, err)
- testhelper.ProtoEqual(t, tc.expectedCommit, commit)
+ if tc.expectedErr != nil || err != nil {
+ require.Equal(t, tc.expectedErr, err)
+ } else {
+ testhelper.ProtoEqual(t, tc.expectedCommit, commit.GitCommit)
+ }
})
}
}