TestStatusAndRingAPIs performs a basic smoke test of all status and ring management endpoints.
(t *testing.T)
| 11 | |
| 12 | // TestStatusAndRingAPIs performs a basic smoke test of all status and ring management endpoints. |
| 13 | func TestStatusAndRingAPIs(t *testing.T) { |
| 14 | util.RunIntegrationTests(t, util.TestHarnessConfig{ |
| 15 | DeploymentMode: util.DeploymentModeMicroservices, |
| 16 | Components: util.ComponentsRecentDataQuerying | util.ComponentsMetricsGeneration | util.ComponentsBackendWork | util.ComponentsBackendQuerying, |
| 17 | }, func(h *util.TempoHarness) { |
| 18 | testCases := []struct { |
| 19 | name string |
| 20 | service string |
| 21 | endpoint string |
| 22 | expectedStatus int |
| 23 | }{ |
| 24 | // All status endpoints on query-frontend |
| 25 | { |
| 26 | name: "status - all info", |
| 27 | service: util.ServiceQueryFrontend, |
| 28 | endpoint: "/status", |
| 29 | expectedStatus: http.StatusOK, |
| 30 | }, |
| 31 | { |
| 32 | name: "status/version", |
| 33 | service: util.ServiceQueryFrontend, |
| 34 | endpoint: "/status/version", |
| 35 | expectedStatus: http.StatusOK, |
| 36 | }, |
| 37 | { |
| 38 | name: "status/services", |
| 39 | service: util.ServiceQueryFrontend, |
| 40 | endpoint: "/status/services", |
| 41 | expectedStatus: http.StatusOK, |
| 42 | }, |
| 43 | { |
| 44 | name: "status/endpoints", |
| 45 | service: util.ServiceQueryFrontend, |
| 46 | endpoint: "/status/endpoints", |
| 47 | expectedStatus: http.StatusOK, |
| 48 | }, |
| 49 | { |
| 50 | name: "status/config", |
| 51 | service: util.ServiceQueryFrontend, |
| 52 | endpoint: "/status/config", |
| 53 | expectedStatus: http.StatusOK, |
| 54 | }, |
| 55 | { |
| 56 | name: "status/runtime_config", |
| 57 | service: util.ServiceQueryFrontend, |
| 58 | endpoint: "/status/runtime_config", |
| 59 | expectedStatus: http.StatusOK, |
| 60 | }, |
| 61 | { |
| 62 | name: "status/buildinfo", |
| 63 | service: util.ServiceQueryFrontend, |
| 64 | endpoint: "/api/status/buildinfo", |
| 65 | expectedStatus: http.StatusOK, |
| 66 | }, |
| 67 | { |
| 68 | name: "status/backendscheduler", |
| 69 | service: util.ServiceBackendScheduler, |
| 70 | endpoint: "/status/backendscheduler", |
nothing calls this directly
no test coverage detected