aboutsummaryrefslogtreecommitdiffstats
path: root/tests/parse_es_requests.rs
diff options
context:
space:
mode:
authorBryan Newbold <bnewbold@archive.org>2020-08-25 14:12:01 -0700
committerBryan Newbold <bnewbold@archive.org>2020-08-25 14:12:01 -0700
commita66caf9b7ae476f526a706d31ed5ef4f8d361b00 (patch)
tree1af41a9d2f1b0a8d02eae41a95892c8c08037306 /tests/parse_es_requests.rs
parentd8d10a292a0d6bd0134fcfe785718bb8f48dd085 (diff)
downloades-public-proxy-a66caf9b7ae476f526a706d31ed5ef4f8d361b00.tar.gz
es-public-proxy-a66caf9b7ae476f526a706d31ed5ef4f8d361b00.zip
parse scroll requests
Diffstat (limited to 'tests/parse_es_requests.rs')
-rw-r--r--tests/parse_es_requests.rs19
1 files changed, 19 insertions, 0 deletions
diff --git a/tests/parse_es_requests.rs b/tests/parse_es_requests.rs
index bd38ce6..d453392 100644
--- a/tests/parse_es_requests.rs
+++ b/tests/parse_es_requests.rs
@@ -78,3 +78,22 @@ fn filter_search_requests() {
rt.block_on(filter_request(req, &config)).unwrap();
}
}
+
+#[test]
+fn filter_scroll_requests() {
+
+ let file_paths = fs::read_dir("tests/files/scroll").unwrap();
+ let mut config = ProxyConfig::default();
+ config.allow_all_indices = Some(true);
+ let mut rt = tokio::runtime::Runtime::new().unwrap();
+
+ for path in file_paths {
+ let path = path.unwrap().path();
+ if path.extension() != Some(OsStr::new("txt")) {
+ continue
+ }
+ println!(" filtering: {}", path.display());
+ let req = common::load_request(&path);
+ rt.block_on(filter_request(req, &config)).unwrap();
+ }
+}