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/gitaly/service/internalgitaly/walkrepos_test.go')
-rw-r--r--internal/gitaly/service/internalgitaly/walkrepos_test.go11
1 files changed, 10 insertions, 1 deletions
diff --git a/internal/gitaly/service/internalgitaly/walkrepos_test.go b/internal/gitaly/service/internalgitaly/walkrepos_test.go
index b69a8cf70..de4e5b23d 100644
--- a/internal/gitaly/service/internalgitaly/walkrepos_test.go
+++ b/internal/gitaly/service/internalgitaly/walkrepos_test.go
@@ -9,6 +9,7 @@ import (
"time"
"github.com/stretchr/testify/require"
+ "gitlab.com/gitlab-org/gitaly/v16/internal/git/catfile"
"gitlab.com/gitlab-org/gitaly/v16/internal/git/gittest"
"gitlab.com/gitlab-org/gitaly/v16/internal/gitaly/config"
"gitlab.com/gitlab-org/gitaly/v16/internal/testhelper"
@@ -70,12 +71,20 @@ func TestWalkRepos(t *testing.T) {
os.Chtimes(testRepo2Path, time.Now(), modifiedDate),
)
+ catfileCache := catfile.NewCache(cfg)
+ t.Cleanup(catfileCache.Stop)
+
// to test a directory being deleted during a walk, we must delete a directory after
// the file walk has started. To achieve that, we wrap the server to pass down a wrapped
// stream that allows us to hook in to stream responses. We then delete 'b' when
// the first repo 'a' is being streamed to the client.
deleteOnce := sync.Once{}
- srv := NewServer([]config.Storage{{Name: storageName, Path: storageRoot}})
+ srv := NewServer(
+ []config.Storage{{Name: storageName, Path: storageRoot}},
+ config.NewLocator(cfg),
+ gittest.NewCommandFactory(t, cfg),
+ catfileCache,
+ )
wsrv := &serverWrapper{
srv,
func(r *gitalypb.WalkReposRequest, s gitalypb.InternalGitaly_WalkReposServer) error {