Skip to content

Run hooks in ReceivePack tests

Sami Hiltunen requested to merge smh-run-hooks-receive-pack into master

Some *ReceivePack tests in 'smarthttp' and 'ssh' packages are stubbing out the hooks to test the environment variables they receive. This is somewhat dubious as testing the environment variables of the hooks should not be done in tests which are testing pushing through the API. It also reduces our test coverage as now the pushes are not tested with actual hooks but just the stubs. Regardless, we likely don't have good coverage anyway for the hooks so let's keep the tests in place. For now, let's just wrap the original hook binary with instrumentation instead of substituting it completely. This way we can dump the environment the tests are asserting while still running the actual hook logic.

Merge request reports