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:
authorPavlo Strokov <pstrokov@gitlab.com>2021-04-28 21:38:33 +0300
committerPavlo Strokov <pstrokov@gitlab.com>2021-04-29 09:56:48 +0300
commit65a86b745f75d78bb16246700beec25d77b98215 (patch)
treeb1b79b7ab4a418a45e781882b149a000ebe2dead
parentfc4c88688e4176062a6524d41e2eb02bf9f4ad17 (diff)
Fix failing TestServerFactory
TestServerFactory fails if run alone. It depends on the ruby for no reason as all we want to do is to check that request reaches the gitaly service through praefect. We change the test to trigger FindCommit RPC that is go-based.
-rw-r--r--internal/praefect/server_factory_test.go7
1 files changed, 5 insertions, 2 deletions
diff --git a/internal/praefect/server_factory_test.go b/internal/praefect/server_factory_test.go
index edaaa0bb8..b00e425a4 100644
--- a/internal/praefect/server_factory_test.go
+++ b/internal/praefect/server_factory_test.go
@@ -93,9 +93,12 @@ func TestServerFactory(t *testing.T) {
t.Helper()
commitClient := gitalypb.NewCommitServiceClient(cc)
- resp, err := commitClient.CommitLanguages(ctx, &gitalypb.CommitLanguagesRequest{Repository: repo, Revision: []byte(revision)})
+ resp, err := commitClient.FindCommit(ctx, &gitalypb.FindCommitRequest{
+ Repository: repo,
+ Revision: []byte(revision),
+ })
require.NoError(t, err)
- require.Len(t, resp.Languages, 4)
+ require.Equal(t, revision, resp.Commit.Id)
}
t.Run("insecure", func(t *testing.T) {