mirror of
https://github.com/meilisearch/meilisearch.git
synced 2025-07-27 16:51:01 +00:00
make the tests compile again
This commit is contained in:
@ -1,3 +1,5 @@
|
||||
use std::sync::Arc;
|
||||
|
||||
use actix_web::http::header::ContentType;
|
||||
use actix_web::test::TestRequest;
|
||||
use actix_web::{http::StatusCode, test};
|
||||
@ -9,7 +11,7 @@ use crate::common::encoder::Encoder;
|
||||
use meilisearch_http::{analytics, create_app, Opt};
|
||||
|
||||
pub struct Service {
|
||||
pub index_scheduler: IndexScheduler,
|
||||
pub index_scheduler: Arc<IndexScheduler>,
|
||||
pub auth: AuthController,
|
||||
pub options: Opt,
|
||||
pub api_key: Option<String>,
|
||||
@ -85,12 +87,12 @@ impl Service {
|
||||
}
|
||||
|
||||
pub async fn request(&self, mut req: test::TestRequest) -> (Value, StatusCode) {
|
||||
let app = test::init_service(create_app!(
|
||||
&self.meilisearch,
|
||||
&self.auth,
|
||||
let app = test::init_service(create_app(
|
||||
self.index_scheduler.clone().into(),
|
||||
self.auth.clone(),
|
||||
self.options.clone(),
|
||||
analytics::MockAnalytics::new(&self.options),
|
||||
true,
|
||||
self.options,
|
||||
analytics::MockAnalytics::new(&self.options).0
|
||||
))
|
||||
.await;
|
||||
|
||||
|
Reference in New Issue
Block a user