Transition all endpoint tests in agent_endpoint_test.go to go through ServeHTTP (#11499)

This commit is contained in:
Mathew Estafanous 2021-12-07 09:44:03 -05:00 committed by GitHub
parent 205ce9a69d
commit 0a9621ec7a
No known key found for this signature in database
GPG Key ID: 4AEE18F83AFDEB23
2 changed files with 819 additions and 770 deletions

View File

@ -1005,7 +1005,7 @@ func (s *HTTPHandlers) AgentHealthServiceByID(resp http.ResponseWriter, req *htt
}
notFoundReason := fmt.Sprintf("ServiceId %s not found", sid.String())
if returnTextPlain(req) {
return notFoundReason, CodeWithPayloadError{StatusCode: http.StatusNotFound, Reason: notFoundReason, ContentType: "application/json"}
return notFoundReason, CodeWithPayloadError{StatusCode: http.StatusNotFound, Reason: notFoundReason, ContentType: "text/plain"}
}
return &api.AgentServiceChecksInfo{
AggregatedStatus: api.HealthCritical,

File diff suppressed because it is too large Load Diff