forked from forgejo/forgejo
Add health check endpoint (#18465)
* chore: add health check endpoint docs: update document about health check fix: fix up Sqlite3 ping. current ping will success even if the db file is missing fix: do not expose privacy information in output field * refactor: remove HealthChecker struct * Added `/api/healthz` to install routes. This was needed for using /api/healthz endpoint in Docker healthchecks, otherwise, Docker would never become healthy if using healthz endpoint and users would not be able to complete the installation of Gitea. * Update modules/cache/cache.go * fine tune * Remove unnecessary test code. Now there are 2 routes for installation (and maybe more in future) Co-authored-by: Lunny Xiao <xiaolunwen@gmail.com> Co-authored-by: wxiaoguang <wxiaoguang@gmail.com> Co-authored-by: 6543 <6543@obermui.de> Co-authored-by: Marcos de Oliveira <marcossantos@furb.br>
This commit is contained in:
parent
3114cd30b8
commit
e933f31426
7 changed files with 261 additions and 13 deletions
|
@ -13,7 +13,6 @@ import (
|
|||
func TestRoutes(t *testing.T) {
|
||||
routes := Routes()
|
||||
assert.NotNil(t, routes)
|
||||
assert.Len(t, routes.R.Routes(), 1)
|
||||
assert.EqualValues(t, "/", routes.R.Routes()[0].Pattern)
|
||||
assert.Nil(t, routes.R.Routes()[0].SubRoutes)
|
||||
assert.Len(t, routes.R.Routes()[0].Handlers, 2)
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue