check-url: Allow to specify expected HTTP code
In gitlab SR a service I need to check - gitlab-workhorse, returns 200 only when request comes to some repository and authentication backend allows it. Requiring access to repositories is not very good just to check if the service is alive, and also auth backend can be not alive, and initially there are no repositories at all. So gitlab-workhorse is checked to be alive by pinging it with non-existing URL and expecting 403. For this to work we need to allow clients to specify expected HTTP code instead of previously hardcoded 200 (which still remains the default). /reviewed-by @cedric.leninivin (on nexedi/slapos!31)
Showing