Test that GL_* values get passed to custom hooks
With hooks, we were missing test coverage to ensure that GL_USERNAME
, GL_REPOSITORY
, GL_ID
, GL_PROTOCOL
get propagated to custom hooks.
note: GL_PROTOCOL
doesn't get through to the custom pre-receive hook, because it gets deleted by the gitlab hook: https://gitlab.com/gitlab-org/gitaly/-/blob/master/ruby/gitlab-shell/hooks/pre-receive#L8
This MR does the following:
- move
WriteCustomHook
andWriteEnvToCustomHook
to thetesthelper
package. - encapsulate
GL_*
values into a new structGlHookValues
to make theEnvForHooks
signature a little nicer - add assertions that test
GL_*
values get passed to custom hooks
Edited by GitLab Release Tools Bot