fix tests

This commit is contained in:
marin postma 2021-06-15 22:21:52 +02:00
parent 0d3fb5ee0d
commit 0dfd1b74c8
No known key found for this signature in database
GPG key ID: 6088B7721C3E39F9
10 changed files with 23 additions and 22 deletions

View file

@ -62,11 +62,12 @@ async fn stats() {
index.wait_update_id(0).await;
let (response, code) = server.stats().await;
assert_eq!(code, 200);
assert!(response["databaseSize"].as_u64().unwrap() > 0);
assert!(response["lastUpdate"].as_str().unwrap() > last_update);
assert!(response.get("lastUpdate").is_some());
assert_eq!(response["indexes"]["test"]["numberOfDocuments"], 2);
assert!(response["indexes"]["test"]["isIndexing"] == false);
assert_eq!(response["indexes"]["test"]["fieldsDistribution"]["id"], 2);