Under the environment created by integrations.test, a forked repo will contain a hook which looks like the following:
cat /tmp/repo1.git/hooks/pre-receive.d/gitea
#!/usr/bin/env bash
"/home/mura/devel/go/src/code.gitea.io/gitea/integrations.test" hook --config='/home/mura/devel/go/src/code.gitea.io/gitea/integrations/sqlite.ini' pre-receive