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:
authorSami Hiltunen <shiltunen@gitlab.com>2021-03-30 15:53:38 +0300
committerSami Hiltunen <shiltunen@gitlab.com>2021-04-07 13:55:18 +0300
commit3e05485c631886f48b6ddc914fadaaf0edc94b76 (patch)
tree64cfaca375381026e6c4d0028011f66d8ce05e74 /internal/gitaly/hook/prereceive_test.go
parentd1fca4def6a5d510faf996ab58503223f5f4fe25 (diff)
dependency inject backchannel registry into Gitaly components
This commit dependency injects a shared backchannel registry to the components that need it, namely the GitalyServerFactory and transaction manager.
Diffstat (limited to 'internal/gitaly/hook/prereceive_test.go')
-rw-r--r--internal/gitaly/hook/prereceive_test.go5
1 files changed, 3 insertions, 2 deletions
diff --git a/internal/gitaly/hook/prereceive_test.go b/internal/gitaly/hook/prereceive_test.go
index 9ce4f7400..1bcf28815 100644
--- a/internal/gitaly/hook/prereceive_test.go
+++ b/internal/gitaly/hook/prereceive_test.go
@@ -9,6 +9,7 @@ import (
"testing"
"github.com/stretchr/testify/require"
+ "gitlab.com/gitlab-org/gitaly/internal/backchannel"
"gitlab.com/gitlab-org/gitaly/internal/git"
"gitlab.com/gitlab-org/gitaly/internal/git/gittest"
"gitlab.com/gitlab-org/gitaly/internal/gitaly/config"
@@ -22,7 +23,7 @@ import (
func TestPrereceive_customHooks(t *testing.T) {
cfg, repo, repoPath := testcfg.BuildWithRepo(t)
- hookManager := NewManager(config.NewLocator(cfg), transaction.NewManager(cfg), GitlabAPIStub, cfg)
+ hookManager := NewManager(config.NewLocator(cfg), transaction.NewManager(cfg, backchannel.NewRegistry()), GitlabAPIStub, cfg)
receiveHooksPayload := &git.ReceiveHooksPayload{
UserID: "1234",
@@ -304,7 +305,7 @@ func TestPrereceive_gitlab(t *testing.T) {
},
}
- hookManager := NewManager(config.NewLocator(cfg), transaction.NewManager(cfg), &gitlabAPI, cfg)
+ hookManager := NewManager(config.NewLocator(cfg), transaction.NewManager(cfg, backchannel.NewRegistry()), &gitlabAPI, cfg)
cleanup = gittest.WriteCustomHook(t, repoPath, "pre-receive", []byte("#!/bin/sh\necho called\n"))
defer cleanup()