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:
authorPatrick Steinhardt <psteinhardt@gitlab.com>2020-11-27 14:08:14 +0300
committerÆvar Arnfjörð Bjarmason <avarab@gmail.com>2020-12-04 18:07:03 +0300
commitec2e1cb57ca9c9f10d52880e3b943274b80c2588 (patch)
tree45a4adf374b9126360be4833cc09a81d92e7382b
parent11923ef0923e109936d6bbdbf44f46e32b1fb2a5 (diff)
coordinator: Switch tests to use non-transactional RPCs
The coordinator tests have two tests which verify routing logic for RPCs which don't use transactions. This is currently implemented via `FetchIntoObjectPool`, but we're in fact about to change it to conditionally use transactions. As this would break tests, let's switch to a different RPC whihc we know won't use transactions.
-rw-r--r--internal/praefect/coordinator_test.go12
1 files changed, 6 insertions, 6 deletions
diff --git a/internal/praefect/coordinator_test.go b/internal/praefect/coordinator_test.go
index 61e864aaf..db6bbe6eb 100644
--- a/internal/praefect/coordinator_test.go
+++ b/internal/praefect/coordinator_test.go
@@ -167,14 +167,15 @@ func TestStreamDirectorMutator(t *testing.T) {
protoregistry.GitalyProtoPreregistered,
)
- frame, err := proto.Marshal(&gitalypb.FetchIntoObjectPoolRequest{
+ frame, err := proto.Marshal(&gitalypb.CreateObjectPoolRequest{
Origin: &targetRepo,
ObjectPool: &gitalypb.ObjectPool{Repository: &targetRepo},
- Repack: false,
})
require.NoError(t, err)
- fullMethod := "/gitaly.ObjectPoolService/FetchIntoObjectPool"
+ require.NoError(t, err)
+
+ fullMethod := "/gitaly.ObjectPoolService/CreateObjectPool"
peeker := &mockPeeker{frame}
streamParams, err := coordinator.StreamDirector(correlation.ContextWithCorrelation(ctx, "my-correlation-id"), fullMethod, peeker)
@@ -674,14 +675,13 @@ func TestAbsentCorrelationID(t *testing.T) {
protoregistry.GitalyProtoPreregistered,
)
- frame, err := proto.Marshal(&gitalypb.FetchIntoObjectPoolRequest{
+ frame, err := proto.Marshal(&gitalypb.CreateObjectPoolRequest{
Origin: &targetRepo,
ObjectPool: &gitalypb.ObjectPool{Repository: &targetRepo},
- Repack: false,
})
require.NoError(t, err)
- fullMethod := "/gitaly.ObjectPoolService/FetchIntoObjectPool"
+ fullMethod := "/gitaly.ObjectPoolService/CreateObjectPool"
peeker := &mockPeeker{frame}
streamParams, err := coordinator.StreamDirector(ctx, fullMethod, peeker)
require.NoError(t, err)