Prepare test suite for switch to Gitaly-embedded Git hooks
What does this MR do?
GitLab uses Git hooks to perform checks and notifications while receiving a git push
. The actual hook executables live in the gitlab-org/gitlab-shell repository but we are trying to move them over to the gitlab-org/gitaly repository (gitaly#1226 (closed)).
Because the hooks try to make API calls to the internal GitLab API, which is not available during rspec
, we intentionally sabotage the Git hooks during the gitlab-ce/ee test suite. This MR updates the sabotage mechanism to sabotage the Git hooks both in the old location tmp/tests/gitlab-shell/hooks
and in the future location tmp/tests/gitaly/ruby/git-hooks
.
This is preparation for gitaly!1088 (merged) where we will do a partial switch to hooks at the new location (tmp/tests/gitaly/ruby/git-hooks
).
During review we ran into Gitlab.config.gitlab_shell.hooks_path
which is a gitlab-ce configuration value that is ignored by Gitaly. Because Gitaly is the thing that connects repositories to the GitLab git hooks, and Gitaly ignores this setting, that means it is useless. So this MR removes that setting.
What are the relevant issue numbers?
Part of gitaly#1226 (closed).
Does this MR meet the acceptance criteria?
-
Changelog entry added, if necessary -
Documentation created/updated via this MR -
Documentation reviewed by technical writer or follow-up review issue created -
Tests added for this feature/bug -
Tested in all supported browsers -
Conforms to the code review guidelines -
Conforms to the merge request performance guidelines -
Conforms to the style guides -
Conforms to the database guides -
Link to e2e tests MR added if this MR has Requires e2e tests label. See the Test Planning Process. -
Security reports checked/validated by reviewer