Fix test not cleaning up hooks
The custom hooks test writes a set of hooks, but does not clean up all
of them. Fix this by executing the callbacks returned by by
writeCustomHook().
Edited by GitLab Release Tools Bot
The custom hooks test writes a set of hooks, but does not clean up all
of them. Fix this by executing the callbacks returned by by
writeCustomHook().