Improve Integration tests in the file stats.rs

This commit is contained in:
Santhosh Reddy Vootukuri (SUNNY) (from Dev Box) 2024-08-08 07:31:46 -07:00 committed by Martin Tzvetanov Grigorov
parent 677e8b122c
commit c2ceb8e41b
No known key found for this signature in database
GPG Key ID: 3194FD8C1AE300EF

View File

@ -3,8 +3,8 @@ use crate::json;
#[actix_rt::test]
async fn stats() {
let server = Server::new().await;
let index = server.index("test");
let server = Server::new_shared().await;
let index = server.unique_index();
let (task, code) = index.create(Some("id")).await;
assert_eq!(code, 202);
@ -47,8 +47,8 @@ async fn stats() {
#[actix_rt::test]
async fn error_get_stats_unexisting_index() {
let server = Server::new().await;
let (response, code) = server.index("test").stats().await;
let server = Server::new_shared().await;
let (response, code) = server.unique_index().stats().await;
let expected_response = json!({
"message": "Index `test` not found.",