diff options
author | Sami Hiltunen <shiltunen@gitlab.com> | 2023-07-28 19:43:28 +0300 |
---|---|---|
committer | Sami Hiltunen <shiltunen@gitlab.com> | 2023-09-26 20:10:28 +0300 |
commit | 4edd816483173fc31503c57c767f9b3e30ba5395 (patch) | |
tree | d1575d8e5f2ea51b95d8dfd61551c1427a20a3cf /internal/gitaly/hook/prereceive_test.go | |
parent | 8c1599b6468757739e4114f2e0e3ace212b34c86 (diff) |
Include transaction ID in the hook payload
The reference transaction hook needs the transaction ID in order
to stage the reference changes in the transaction. This commit
includes the transaction ID in the hook payload.
Diffstat (limited to 'internal/gitaly/hook/prereceive_test.go')
-rw-r--r-- | internal/gitaly/hook/prereceive_test.go | 7 |
1 files changed, 6 insertions, 1 deletions
diff --git a/internal/gitaly/hook/prereceive_test.go b/internal/gitaly/hook/prereceive_test.go index 1525e096b..81cda3bf4 100644 --- a/internal/gitaly/hook/prereceive_test.go +++ b/internal/gitaly/hook/prereceive_test.go @@ -15,6 +15,7 @@ import ( "gitlab.com/gitlab-org/gitaly/v16/internal/git/localrepo" "gitlab.com/gitlab-org/gitaly/v16/internal/git/quarantine" "gitlab.com/gitlab-org/gitaly/v16/internal/gitaly/config" + "gitlab.com/gitlab-org/gitaly/v16/internal/gitaly/storage" "gitlab.com/gitlab-org/gitaly/v16/internal/gitaly/transaction" "gitlab.com/gitlab-org/gitaly/v16/internal/gitlab" "gitlab.com/gitlab-org/gitaly/v16/internal/grpc/backchannel" @@ -57,6 +58,7 @@ func TestPrereceive_customHooks(t *testing.T) { receiveHooksPayload, git.PreReceiveHook, featureflag.FromContext(ctx), + storage.ExtractTransactionID(ctx), ).Env() require.NoError(t, err) @@ -70,6 +72,7 @@ func TestPrereceive_customHooks(t *testing.T) { receiveHooksPayload, git.PreReceiveHook, featureflag.FromContext(ctx), + storage.ExtractTransactionID(ctx), ).Env() require.NoError(t, err) @@ -83,6 +86,7 @@ func TestPrereceive_customHooks(t *testing.T) { receiveHooksPayload, git.PreReceiveHook, featureflag.FromContext(ctx), + storage.ExtractTransactionID(ctx), ).Env() require.NoError(t, err) @@ -248,6 +252,7 @@ func TestPrereceive_quarantine(t *testing.T) { }, git.PreReceiveHook, featureflag.FromContext(ctx), + storage.ExtractTransactionID(ctx), ).Env() require.NoError(t, err) @@ -309,7 +314,7 @@ func TestPrereceive_gitlab(t *testing.T) { UserID: "1234", Username: "user", Protocol: "web", - }, git.PreReceiveHook, nil).Env() + }, git.PreReceiveHook, nil, storage.ExtractTransactionID(ctx)).Env() require.NoError(t, err) standardEnv := []string{payload} |