test(http): server & index stats

This commit is contained in:
Alexey Shekhirin
2021-04-01 21:54:37 +03:00
parent dd9eae8c26
commit 09d9a29176
5 changed files with 108 additions and 0 deletions

View File

@ -161,6 +161,11 @@ impl Index<'_> {
let url = format!("/indexes/{}/settings", self.uid);
self.service.delete(url).await
}
pub async fn stats(&self) -> (Value, StatusCode) {
let url = format!("/indexes/{}/stats", self.uid);
self.service.get(url).await
}
}
pub struct GetDocumentOptions;

View File

@ -58,6 +58,10 @@ impl Server {
pub async fn version(&self) -> (Value, StatusCode) {
self.service.get("/version").await
}
pub async fn stats(&self) -> (Value, StatusCode) {
self.service.get("/stats").await
}
}
pub fn default_settings(dir: impl AsRef<Path>) -> Opt {