- pingReq = &RequestTester{
- method: "GET",
- uri: "/_health/ping",
- }
- response = IssueHealthCheckRequest(pingReq)
- ExpectStatusCode(t,
- "authorization required",
- http.StatusUnauthorized,
- response)
-
- // ping with wrong token
- pingReq = &RequestTester{
- method: "GET",
- uri: "/_health/ping",
- apiToken: "youarenotwelcomehere",
- }
- response = IssueHealthCheckRequest(pingReq)
- ExpectStatusCode(t,
- "authorization error",
- http.StatusForbidden,
- response)
-
- // ping with management token
- pingReq = &RequestTester{