diff --git a/gorush/server_test.go b/gorush/server_test.go index e8b8b8e..f186d93 100644 --- a/gorush/server_test.go +++ b/gorush/server_test.go @@ -353,7 +353,7 @@ func TestMetricsHandler(t *testing.T) { }) } -func TestHeartbeatHandler(t *testing.T) { +func TestGETHeartbeatHandler(t *testing.T) { initTest() r := gofight.New() @@ -364,6 +364,17 @@ func TestHeartbeatHandler(t *testing.T) { }) } +func TestHEADHeartbeatHandler(t *testing.T) { + initTest() + + r := gofight.New() + + r.HEAD("/healthz"). + Run(routerEngine(), func(r gofight.HTTPResponse, rq gofight.HTTPRequest) { + assert.Equal(t, http.StatusOK, r.Code) + }) +} + func TestVersionHandler(t *testing.T) { SetVersion("3.0.0") initTest()