|
|
|
@ -74,6 +74,18 @@ fn get_dir_search(server: TestServer) -> Result<(), Error> {
@@ -74,6 +74,18 @@ fn get_dir_search(server: TestServer) -> Result<(), Error> {
|
|
|
|
|
Ok(()) |
|
|
|
|
} |
|
|
|
|
|
|
|
|
|
#[rstest] |
|
|
|
|
fn get_dir_search2(server: TestServer) -> Result<(), Error> { |
|
|
|
|
let resp = reqwest::blocking::get(format!("{}?q={}", server.url(), "😀.data"))?; |
|
|
|
|
assert_eq!(resp.status(), 200); |
|
|
|
|
let paths = utils::retrive_index_paths(&resp.text()?); |
|
|
|
|
assert!(!paths.is_empty()); |
|
|
|
|
for p in paths { |
|
|
|
|
assert!(p.contains(&"😀.data")); |
|
|
|
|
} |
|
|
|
|
Ok(()) |
|
|
|
|
} |
|
|
|
|
|
|
|
|
|
#[rstest] |
|
|
|
|
fn head_dir_search(server: TestServer) -> Result<(), Error> { |
|
|
|
|
let resp = fetch!(b"HEAD", format!("{}?q={}", server.url(), "test.html")).send()?; |
|
|
|
|