System Hook Tests should include all options
From a customer: https://gitlab.zendesk.com/agent/tickets/81736
I have upgraded my test environment to 9.5.1-ee, I'm testing out Web hooks. The functionality in this area changed, and now I cannot test webhooks with the default configuration. To do this I setup a valid URL, under triggers I have everything unchecked as I intend to use this for a hook when adding users. When I select any of the options under test I get various errors: Repository Update Event: Hook execution failed: Ensure project "NAMESPACE / PROJECT" has commits Push Events: same message as the previous Tag push events: Hook execution failed: Ensure project "NAMESPACE / PROJECT" has tags
In my case, I don't care about any of those, I want to make sure the hooks will generally work, like it previously did. I would expect there to be a general option, or a test option for each feature.
Repro steps:
- Be an admin.
- Log in to admin interface.
- Go to System Hooks.
- Create a hook with no "optional events" (do not check the Repository update events/Push events/Tag push events options)
- Navigate to the new hook you just added.
- Choose the Test Field.
- Options only appear for the "optional events".
Solution:
- Make a general test event that will send a general request with values set for everything.
- Make each feature have it's own test.