(t *testing.T)
| 19 | ) |
| 20 | |
| 21 | func TestCompression(t *testing.T) { |
| 22 | util.RunIntegrationTests(t, util.TestHarnessConfig{ |
| 23 | DeploymentMode: util.DeploymentModeSingleBinary, |
| 24 | }, func(h *util.TempoHarness) { |
| 25 | h.WaitTracesWritable(t) |
| 26 | |
| 27 | // Send a trace |
| 28 | info := tempoUtil.NewTraceInfo(time.Now(), "") |
| 29 | require.NoError(t, h.WriteTraceInfo(info, "")) |
| 30 | |
| 31 | h.WaitTracesQueryable(t, 1) |
| 32 | |
| 33 | // Create client with compression |
| 34 | apiClient := h.APIClientHTTP("") |
| 35 | util.QueryAndAssertTrace(t, apiClient, info) |
| 36 | |
| 37 | // Query and assert trace with compression |
| 38 | apiClient.WithTransport(gzhttp.Transport(http.DefaultTransport)) |
| 39 | queryAndAssertTraceCompression(t, apiClient, info) |
| 40 | }) |
| 41 | } |
| 42 | |
| 43 | func queryAndAssertTraceCompression(t *testing.T, client *httpclient.Client, info *tempoUtil.TraceInfo) { |
| 44 | // The received client will strip the header before we have a chance to inspect it, so just validate that the compressed client works as expected. |
nothing calls this directly
no test coverage detected