hooks: assert that we've got s.hookManager instead of dying
Before this when running with my nascent UserCreateTag in Go code we'd die in auth_test.go with:
TestAuthBeforeLimit: auth_test.go:380:
Error Trace: auth_test.go:380
Error: Received unexpected error:
rpc error: code = Internal desc =
panic: runtime error: invalid memory
address or nil pointer dereference
Test: TestAuthBeforeLimit
Now we'll emit the better error message of:
rpc error: code = Internal desc = panic: The hookManager must be
set up already! Did you migrate non-hook-supporting code from Ruby
to Go?
To reproduce run:
go test -v ./internal/gitaly/server/ -run 'TestAuth' -count=1
See [1] for more background details & further explanation, add a comment pointing to it to aid future debugging.