mirror of
https://github.com/meilisearch/meilisearch.git
synced 2024-11-29 16:45:30 +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 actix_web::test;
|
||||||
|
|
||||||
use crate::common::encoder::Encoder;
|
use crate::common::encoder::Encoder;
|
||||||
use meilisearch_http::{analytics, create_app};
|
|
||||||
use serde_json::{json, Value};
|
use serde_json::{json, Value};
|
||||||
use time::{format_description::well_known::Rfc3339, OffsetDateTime};
|
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
|
// this is a what is expected and should work
|
||||||
let server = Server::new().await;
|
let server = Server::new().await;
|
||||||
let app = test::init_service(create_app!(
|
let app = server.init_web_app().await;
|
||||||
&server.service.meilisearch,
|
|
||||||
&server.service.auth,
|
|
||||||
true,
|
|
||||||
server.service.options,
|
|
||||||
analytics::MockAnalytics::new(&server.service.options).0
|
|
||||||
))
|
|
||||||
.await;
|
|
||||||
// post
|
// post
|
||||||
let document = serde_json::to_string(&document).unwrap();
|
let document = serde_json::to_string(&document).unwrap();
|
||||||
let encoder = Encoder::Gzip;
|
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
|
// this is a what is expected and should work
|
||||||
let server = Server::new().await;
|
let server = Server::new().await;
|
||||||
let app = test::init_service(create_app!(
|
let app = server.init_web_app().await;
|
||||||
&server.service.meilisearch,
|
|
||||||
&server.service.auth,
|
|
||||||
true,
|
|
||||||
server.service.options,
|
|
||||||
analytics::MockAnalytics::new(&server.service.options).0
|
|
||||||
))
|
|
||||||
.await;
|
|
||||||
// post
|
// post
|
||||||
let document = serde_json::to_string(&document).unwrap();
|
let document = serde_json::to_string(&document).unwrap();
|
||||||
|
|
||||||
|
@ -3,7 +3,6 @@ use actix_web::test;
|
|||||||
use http::header::ACCEPT_ENCODING;
|
use http::header::ACCEPT_ENCODING;
|
||||||
|
|
||||||
use crate::common::encoder::Encoder;
|
use crate::common::encoder::Encoder;
|
||||||
use meilisearch_http::{analytics, create_app};
|
|
||||||
use serde_json::{json, Value};
|
use serde_json::{json, Value};
|
||||||
use urlencoding::encode as urlencode;
|
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);
|
let index = server.index(index_uid);
|
||||||
index.load_test_set().await;
|
index.load_test_set().await;
|
||||||
|
|
||||||
let app = test::init_service(create_app!(
|
let app = server.init_web_app().await;
|
||||||
&server.service.meilisearch,
|
|
||||||
&server.service.auth,
|
|
||||||
true,
|
|
||||||
server.service.options,
|
|
||||||
analytics::MockAnalytics::new(&server.service.options).0
|
|
||||||
))
|
|
||||||
.await;
|
|
||||||
|
|
||||||
let req = test::TestRequest::get()
|
let req = test::TestRequest::get()
|
||||||
.uri(&format!("/indexes/{}/documents?", urlencode(index_uid)))
|
.uri(&format!("/indexes/{}/documents?", urlencode(index_uid)))
|
||||||
.insert_header((ACCEPT_ENCODING, "gzip"))
|
.insert_header((ACCEPT_ENCODING, "gzip"))
|
||||||
|
@ -3,7 +3,6 @@ use crate::common::Server;
|
|||||||
use actix_web::http::header::ContentType;
|
use actix_web::http::header::ContentType;
|
||||||
use actix_web::test;
|
use actix_web::test;
|
||||||
use http::header::ACCEPT_ENCODING;
|
use http::header::ACCEPT_ENCODING;
|
||||||
use meilisearch_http::{analytics, create_app};
|
|
||||||
use serde_json::{json, Value};
|
use serde_json::{json, Value};
|
||||||
|
|
||||||
#[actix_rt::test]
|
#[actix_rt::test]
|
||||||
@ -43,14 +42,7 @@ async fn create_index_with_gzip_encoded_request() {
|
|||||||
#[actix_rt::test]
|
#[actix_rt::test]
|
||||||
async fn create_index_with_gzip_encoded_request_and_receiving_brotli_encoded_response() {
|
async fn create_index_with_gzip_encoded_request_and_receiving_brotli_encoded_response() {
|
||||||
let server = Server::new().await;
|
let server = Server::new().await;
|
||||||
let app = test::init_service(create_app!(
|
let app = server.init_web_app().await;
|
||||||
&server.service.meilisearch,
|
|
||||||
&server.service.auth,
|
|
||||||
true,
|
|
||||||
server.service.options,
|
|
||||||
analytics::MockAnalytics::new(&server.service.options).0
|
|
||||||
))
|
|
||||||
.await;
|
|
||||||
|
|
||||||
let body = serde_json::to_string(&json!({
|
let body = serde_json::to_string(&json!({
|
||||||
"uid": "test",
|
"uid": "test",
|
||||||
|
@ -1,5 +1,3 @@
|
|||||||
use meilisearch_http::analytics;
|
|
||||||
|
|
||||||
mod auth;
|
mod auth;
|
||||||
mod common;
|
mod common;
|
||||||
mod dashboard;
|
mod dashboard;
|
||||||
|
Loading…
Reference in New Issue
Block a user