chore(lint): linting the codebase (#4668)

Signed-off-by: Rui Chen <rui@chenrui.dev>
This commit is contained in:
Rui Chen
2024-06-17 11:22:30 -04:00
committed by GitHub
parent ca113f1812
commit 8dccb2beb4
14 changed files with 59 additions and 40 deletions

View File

@@ -139,9 +139,12 @@ func TestHealthz(t *testing.T) {
req, _ := http.NewRequest("GET", "/healthz", bytes.NewBuffer(nil))
w := httptest.NewRecorder()
s.Healthz(w, req)
Equals(t, http.StatusOK, w.Result().StatusCode)
body, _ := io.ReadAll(w.Result().Body)
Equals(t, "application/json", w.Result().Header["Content-Type"][0])
resp := w.Result()
defer resp.Body.Close()
Equals(t, http.StatusOK, resp.StatusCode)
body, _ := io.ReadAll(resp.Body)
Equals(t, "application/json", resp.Header["Content-Type"][0])
Equals(t,
`{
"status": "ok"