mirror of
https://github.com/meilisearch/meilisearch.git
synced 2024-11-22 18:17:39 +08:00
Fix final compilation
This commit is contained in:
parent
61edcd585a
commit
788262e588
@ -2,7 +2,6 @@ use crate::common::{GetAllDocumentsOptions, Server};
|
||||
use actix_web::test;
|
||||
|
||||
use crate::common::encoder::Encoder;
|
||||
use meilisearch_http::{analytics, create_app};
|
||||
use serde_json::{json, Value};
|
||||
use time::{format_description::well_known::Rfc3339, OffsetDateTime};
|
||||
|
||||
@ -96,14 +95,7 @@ async fn add_single_document_gzip_encoded() {
|
||||
|
||||
// this is a what is expected and should work
|
||||
let server = Server::new().await;
|
||||
let app = test::init_service(create_app!(
|
||||
&server.service.meilisearch,
|
||||
&server.service.auth,
|
||||
true,
|
||||
server.service.options,
|
||||
analytics::MockAnalytics::new(&server.service.options).0
|
||||
))
|
||||
.await;
|
||||
let app = server.init_web_app().await;
|
||||
// post
|
||||
let document = serde_json::to_string(&document).unwrap();
|
||||
let encoder = Encoder::Gzip;
|
||||
@ -145,14 +137,7 @@ async fn add_single_document_with_every_encoding() {
|
||||
|
||||
// this is a what is expected and should work
|
||||
let server = Server::new().await;
|
||||
let app = test::init_service(create_app!(
|
||||
&server.service.meilisearch,
|
||||
&server.service.auth,
|
||||
true,
|
||||
server.service.options,
|
||||
analytics::MockAnalytics::new(&server.service.options).0
|
||||
))
|
||||
.await;
|
||||
let app = server.init_web_app().await;
|
||||
// post
|
||||
let document = serde_json::to_string(&document).unwrap();
|
||||
|
||||
|
@ -3,7 +3,6 @@ use actix_web::test;
|
||||
use http::header::ACCEPT_ENCODING;
|
||||
|
||||
use crate::common::encoder::Encoder;
|
||||
use meilisearch_http::{analytics, create_app};
|
||||
use serde_json::{json, Value};
|
||||
use urlencoding::encode as urlencode;
|
||||
|
||||
@ -167,15 +166,7 @@ async fn get_all_documents_no_options_with_response_compression() {
|
||||
let index = server.index(index_uid);
|
||||
index.load_test_set().await;
|
||||
|
||||
let app = test::init_service(create_app!(
|
||||
&server.service.meilisearch,
|
||||
&server.service.auth,
|
||||
true,
|
||||
server.service.options,
|
||||
analytics::MockAnalytics::new(&server.service.options).0
|
||||
))
|
||||
.await;
|
||||
|
||||
let app = server.init_web_app().await;
|
||||
let req = test::TestRequest::get()
|
||||
.uri(&format!("/indexes/{}/documents?", urlencode(index_uid)))
|
||||
.insert_header((ACCEPT_ENCODING, "gzip"))
|
||||
|
@ -3,7 +3,6 @@ use crate::common::Server;
|
||||
use actix_web::http::header::ContentType;
|
||||
use actix_web::test;
|
||||
use http::header::ACCEPT_ENCODING;
|
||||
use meilisearch_http::{analytics, create_app};
|
||||
use serde_json::{json, Value};
|
||||
|
||||
#[actix_rt::test]
|
||||
@ -43,14 +42,7 @@ async fn create_index_with_gzip_encoded_request() {
|
||||
#[actix_rt::test]
|
||||
async fn create_index_with_gzip_encoded_request_and_receiving_brotli_encoded_response() {
|
||||
let server = Server::new().await;
|
||||
let app = test::init_service(create_app!(
|
||||
&server.service.meilisearch,
|
||||
&server.service.auth,
|
||||
true,
|
||||
server.service.options,
|
||||
analytics::MockAnalytics::new(&server.service.options).0
|
||||
))
|
||||
.await;
|
||||
let app = server.init_web_app().await;
|
||||
|
||||
let body = serde_json::to_string(&json!({
|
||||
"uid": "test",
|
||||
|
@ -1,5 +1,3 @@
|
||||
use meilisearch_http::analytics;
|
||||
|
||||
mod auth;
|
||||
mod common;
|
||||
mod dashboard;
|
||||
|
Loading…
Reference in New Issue
Block a user