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/hook/update_test.go')
-rw-r--r--internal/gitaly/hook/update_test.go13
1 files changed, 7 insertions, 6 deletions
diff --git a/internal/gitaly/hook/update_test.go b/internal/gitaly/hook/update_test.go
index 63b212080..5ed7b8b59 100644
--- a/internal/gitaly/hook/update_test.go
+++ b/internal/gitaly/hook/update_test.go
@@ -12,16 +12,17 @@ import (
"gitlab.com/gitlab-org/gitaly/internal/git/gittest"
"gitlab.com/gitlab-org/gitaly/internal/gitaly/config"
"gitlab.com/gitlab-org/gitaly/internal/gitaly/transaction"
+ "gitlab.com/gitlab-org/gitaly/internal/gitlab"
"gitlab.com/gitlab-org/gitaly/internal/metadata/featureflag"
- "gitlab.com/gitlab-org/gitaly/internal/praefect/metadata"
"gitlab.com/gitlab-org/gitaly/internal/testhelper"
"gitlab.com/gitlab-org/gitaly/internal/testhelper/testcfg"
+ "gitlab.com/gitlab-org/gitaly/internal/transaction/txinfo"
)
func TestUpdate_customHooks(t *testing.T) {
cfg, repo, repoPath := testcfg.BuildWithRepo(t)
- hookManager := NewManager(config.NewLocator(cfg), transaction.NewManager(cfg, backchannel.NewRegistry()), GitlabAPIStub, cfg)
+ hookManager := NewManager(config.NewLocator(cfg), transaction.NewManager(cfg, backchannel.NewRegistry()), gitlab.NewMockClient(), cfg)
receiveHooksPayload := &git.ReceiveHooksPayload{
UserID: "1234",
@@ -38,10 +39,10 @@ func TestUpdate_customHooks(t *testing.T) {
primaryPayload, err := git.NewHooksPayload(
cfg,
repo,
- &metadata.Transaction{
+ &txinfo.Transaction{
ID: 1234, Node: "primary", Primary: true,
},
- &metadata.PraefectServer{
+ &txinfo.PraefectServer{
SocketPath: "/path/to/socket",
Token: "secret",
},
@@ -54,10 +55,10 @@ func TestUpdate_customHooks(t *testing.T) {
secondaryPayload, err := git.NewHooksPayload(
cfg,
repo,
- &metadata.Transaction{
+ &txinfo.Transaction{
ID: 1234, Node: "secondary", Primary: false,
},
- &metadata.PraefectServer{
+ &txinfo.PraefectServer{
SocketPath: "/path/to/socket",
Token: "secret",
},