Skip to content

Commit 619a964

Browse files
committed
manually set headers in test
1 parent 0c86499 commit 619a964

File tree

4 files changed

+3
-7
lines changed

4 files changed

+3
-7
lines changed

quickwit/quickwit-serve/src/decompression.rs

+1-1
Original file line numberDiff line numberDiff line change
@@ -21,10 +21,10 @@ use std::io::Read;
2121

2222
use bytes::Bytes;
2323
use flate2::read::GzDecoder;
24+
use thiserror::Error;
2425
use tokio::task;
2526
use warp::reject::Reject;
2627
use warp::Filter;
27-
use thiserror::Error;
2828

2929
/// There are two ways to decompress the body:
3030
/// - Stream the body through an async decompressor

quickwit/rest-api-tests/run_tests.py

-4
Original file line numberDiff line numberDiff line change
@@ -95,10 +95,6 @@ def run_request_step(method, step, previous_result):
9595
if body_from_file is not None:
9696
body_from_file = osp.join(step["cwd"], body_from_file)
9797
kvargs["data"] = open(body_from_file, 'rb').read()
98-
if body_from_file.endswith("gz"):
99-
kvargs.setdefault("headers")["content-encoding"] = "gzip"
100-
if body_from_file.endswith("zst"):
101-
kvargs.setdefault("headers")["content-encoding"] = "zstd"
10298

10399
kvargs = resolve_previous_result(kvargs, previous_result)
104100
ndjson = step.get("ndjson", None)

quickwit/rest-api-tests/scenarii/es_compatibility/_setup.elasticsearch.yaml

+1-1
Original file line numberDiff line numberDiff line change
@@ -102,6 +102,6 @@ method: POST
102102
endpoint: _bulk
103103
params:
104104
refresh: "true"
105-
headers: {"Content-Type": "application/json"}
105+
headers: {"Content-Type": "application/json", "content-encoding": "gzip"}
106106
body_from_file: gharchive-bulk.json.gz
107107

quickwit/rest-api-tests/scenarii/es_compatibility/_setup.quickwit.yaml

+1-1
Original file line numberDiff line numberDiff line change
@@ -56,6 +56,6 @@ endpoint: _bulk
5656
num_retries: 10
5757
params:
5858
refresh: "true"
59-
headers: {"Content-Type": "application/json"}
59+
headers: {"Content-Type": "application/json", "content-encoding": "gzip"}
6060
body_from_file: gharchive-bulk.json.gz
6161
sleep_after: 3

0 commit comments

Comments
 (0)