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>2021-12-15 10:38:05 +0300
committerPatrick Steinhardt <psteinhardt@gitlab.com>2021-12-20 12:42:56 +0300
commit80e9c85eab630c691f7e6c7ad6c4a0c50ff6d9e8 (patch)
tree8a597a73b98b059f688a8ab0e1d5dc4e82d00fa9
parentdb2391fbbbf4ed41907196af412727655006a9df (diff)
objectpool: Convert to set hooks path via config
The objectpool package overrides the hooks path by setting the global `config.OverrideHooksPath` variable, which is deprecated and about to be removed. Convert it to instead set up the hooks path via the Gitaly configuration.
-rw-r--r--internal/git/objectpool/testhelper_test.go7
1 files changed, 3 insertions, 4 deletions
diff --git a/internal/git/objectpool/testhelper_test.go b/internal/git/objectpool/testhelper_test.go
index f9e929d4e..8df7f45eb 100644
--- a/internal/git/objectpool/testhelper_test.go
+++ b/internal/git/objectpool/testhelper_test.go
@@ -17,16 +17,15 @@ import (
)
func TestMain(m *testing.M) {
- testhelper.Run(m, testhelper.WithSetup(func() error {
- config.OverrideHooksPath = "/"
- return nil
- }))
+ testhelper.Run(m)
}
func setupObjectPool(t *testing.T, ctx context.Context) (*ObjectPool, *gitalypb.Repository) {
t.Helper()
cfg, repo, _ := testcfg.BuildWithRepo(t)
+ // We have no Gitaly server set up in these tests, so we cannot use hooks.
+ cfg.Git.HooksPath = "/"
gitCommandFactory := git.NewExecCommandFactory(cfg)
catfileCache := catfile.NewCache(cfg)