1
0
mirror of https://github.com/astaxie/beego.git synced 2024-11-25 18:10:55 +00:00

refacted cache health check from toolbox

This commit is contained in:
Eyitayo Ogunbiyi 2020-07-07 16:46:59 +01:00
parent e0f8c6832d
commit 728bf34006

View File

@ -187,7 +187,6 @@ func TestBuildHealthCheckResponseList(t *testing.T) {
func TestHealthCheckHandlerReturnsJSON(t *testing.T) { func TestHealthCheckHandlerReturnsJSON(t *testing.T) {
toolbox.AddHealthCheck("database", &SampleDatabaseCheck{}) toolbox.AddHealthCheck("database", &SampleDatabaseCheck{})
toolbox.AddHealthCheck("cache", &SampleCacheCheck{})
req, err := http.NewRequest("GET", "/healthcheck?json=true", nil) req, err := http.NewRequest("GET", "/healthcheck?json=true", nil)
if err != nil { if err != nil {
@ -213,11 +212,6 @@ func TestHealthCheckHandlerReturnsJSON(t *testing.T) {
"message":"database", "message":"database",
"name":"success", "name":"success",
"status":"OK" "status":"OK"
},
{
"message":"cache",
"name":"error",
"status":"no cache detected"
} }
] ]
`) `)