mirror of
https://github.com/meilisearch/meilisearch.git
synced 2024-11-26 12:05:05 +08:00
Fix non insta tests
This commit is contained in:
parent
72e2b220ed
commit
d2420f5c8f
@ -73,7 +73,7 @@ static INVALID_RESPONSE: Lazy<Value> = Lazy::new(|| {
|
|||||||
json!({"message": "The provided API key is invalid.",
|
json!({"message": "The provided API key is invalid.",
|
||||||
"code": "invalid_api_key",
|
"code": "invalid_api_key",
|
||||||
"type": "auth",
|
"type": "auth",
|
||||||
"link": "https://docs.meilisearch.com/errors#invalid-api-key"
|
"link": "https://docs.meilisearch.com/errors#invalid_api_key"
|
||||||
})
|
})
|
||||||
});
|
});
|
||||||
|
|
||||||
@ -520,7 +520,7 @@ async fn error_creating_index_without_action() {
|
|||||||
"message": "Index `test` not found.",
|
"message": "Index `test` not found.",
|
||||||
"code": "index_not_found",
|
"code": "index_not_found",
|
||||||
"type": "invalid_request",
|
"type": "invalid_request",
|
||||||
"link": "https://docs.meilisearch.com/errors#index-not-found"
|
"link": "https://docs.meilisearch.com/errors#index_not_found"
|
||||||
});
|
});
|
||||||
|
|
||||||
// try to create a index via add documents route
|
// try to create a index via add documents route
|
||||||
|
@ -37,7 +37,7 @@ async fn error_api_key_bad_content_types() {
|
|||||||
);
|
);
|
||||||
assert_eq!(response["code"], "invalid_content_type");
|
assert_eq!(response["code"], "invalid_content_type");
|
||||||
assert_eq!(response["type"], "invalid_request");
|
assert_eq!(response["type"], "invalid_request");
|
||||||
assert_eq!(response["link"], "https://docs.meilisearch.com/errors#invalid-content-type");
|
assert_eq!(response["link"], "https://docs.meilisearch.com/errors#invalid_content_type");
|
||||||
|
|
||||||
// patch
|
// patch
|
||||||
let req = test::TestRequest::patch()
|
let req = test::TestRequest::patch()
|
||||||
@ -59,7 +59,7 @@ async fn error_api_key_bad_content_types() {
|
|||||||
);
|
);
|
||||||
assert_eq!(response["code"], "invalid_content_type");
|
assert_eq!(response["code"], "invalid_content_type");
|
||||||
assert_eq!(response["type"], "invalid_request");
|
assert_eq!(response["type"], "invalid_request");
|
||||||
assert_eq!(response["link"], "https://docs.meilisearch.com/errors#invalid-content-type");
|
assert_eq!(response["link"], "https://docs.meilisearch.com/errors#invalid_content_type");
|
||||||
}
|
}
|
||||||
|
|
||||||
#[actix_rt::test]
|
#[actix_rt::test]
|
||||||
@ -96,7 +96,7 @@ async fn error_api_key_empty_content_types() {
|
|||||||
);
|
);
|
||||||
assert_eq!(response["code"], "invalid_content_type");
|
assert_eq!(response["code"], "invalid_content_type");
|
||||||
assert_eq!(response["type"], "invalid_request");
|
assert_eq!(response["type"], "invalid_request");
|
||||||
assert_eq!(response["link"], "https://docs.meilisearch.com/errors#invalid-content-type");
|
assert_eq!(response["link"], "https://docs.meilisearch.com/errors#invalid_content_type");
|
||||||
|
|
||||||
// patch
|
// patch
|
||||||
let req = test::TestRequest::patch()
|
let req = test::TestRequest::patch()
|
||||||
@ -118,7 +118,7 @@ async fn error_api_key_empty_content_types() {
|
|||||||
);
|
);
|
||||||
assert_eq!(response["code"], "invalid_content_type");
|
assert_eq!(response["code"], "invalid_content_type");
|
||||||
assert_eq!(response["type"], "invalid_request");
|
assert_eq!(response["type"], "invalid_request");
|
||||||
assert_eq!(response["link"], "https://docs.meilisearch.com/errors#invalid-content-type");
|
assert_eq!(response["link"], "https://docs.meilisearch.com/errors#invalid_content_type");
|
||||||
}
|
}
|
||||||
|
|
||||||
#[actix_rt::test]
|
#[actix_rt::test]
|
||||||
@ -154,7 +154,7 @@ async fn error_api_key_missing_content_types() {
|
|||||||
);
|
);
|
||||||
assert_eq!(response["code"], "missing_content_type");
|
assert_eq!(response["code"], "missing_content_type");
|
||||||
assert_eq!(response["type"], "invalid_request");
|
assert_eq!(response["type"], "invalid_request");
|
||||||
assert_eq!(response["link"], "https://docs.meilisearch.com/errors#missing-content-type");
|
assert_eq!(response["link"], "https://docs.meilisearch.com/errors#missing_content_type");
|
||||||
|
|
||||||
// patch
|
// patch
|
||||||
let req = test::TestRequest::patch()
|
let req = test::TestRequest::patch()
|
||||||
@ -175,7 +175,7 @@ async fn error_api_key_missing_content_types() {
|
|||||||
);
|
);
|
||||||
assert_eq!(response["code"], "missing_content_type");
|
assert_eq!(response["code"], "missing_content_type");
|
||||||
assert_eq!(response["type"], "invalid_request");
|
assert_eq!(response["type"], "invalid_request");
|
||||||
assert_eq!(response["link"], "https://docs.meilisearch.com/errors#missing-content-type");
|
assert_eq!(response["link"], "https://docs.meilisearch.com/errors#missing_content_type");
|
||||||
}
|
}
|
||||||
|
|
||||||
#[actix_rt::test]
|
#[actix_rt::test]
|
||||||
@ -200,7 +200,7 @@ async fn error_api_key_empty_payload() {
|
|||||||
assert_eq!(status_code, 400);
|
assert_eq!(status_code, 400);
|
||||||
assert_eq!(response["code"], json!("missing_payload"));
|
assert_eq!(response["code"], json!("missing_payload"));
|
||||||
assert_eq!(response["type"], json!("invalid_request"));
|
assert_eq!(response["type"], json!("invalid_request"));
|
||||||
assert_eq!(response["link"], json!("https://docs.meilisearch.com/errors#missing-payload"));
|
assert_eq!(response["link"], json!("https://docs.meilisearch.com/errors#missing_payload"));
|
||||||
assert_eq!(response["message"], json!(r#"A json payload is missing."#));
|
assert_eq!(response["message"], json!(r#"A json payload is missing."#));
|
||||||
|
|
||||||
// patch
|
// patch
|
||||||
@ -217,7 +217,7 @@ async fn error_api_key_empty_payload() {
|
|||||||
assert_eq!(status_code, 400);
|
assert_eq!(status_code, 400);
|
||||||
assert_eq!(response["code"], json!("missing_payload"));
|
assert_eq!(response["code"], json!("missing_payload"));
|
||||||
assert_eq!(response["type"], json!("invalid_request"));
|
assert_eq!(response["type"], json!("invalid_request"));
|
||||||
assert_eq!(response["link"], json!("https://docs.meilisearch.com/errors#missing-payload"));
|
assert_eq!(response["link"], json!("https://docs.meilisearch.com/errors#missing_payload"));
|
||||||
assert_eq!(response["message"], json!(r#"A json payload is missing."#));
|
assert_eq!(response["message"], json!(r#"A json payload is missing."#));
|
||||||
}
|
}
|
||||||
|
|
||||||
@ -243,7 +243,7 @@ async fn error_api_key_malformed_payload() {
|
|||||||
assert_eq!(status_code, 400);
|
assert_eq!(status_code, 400);
|
||||||
assert_eq!(response["code"], json!("malformed_payload"));
|
assert_eq!(response["code"], json!("malformed_payload"));
|
||||||
assert_eq!(response["type"], json!("invalid_request"));
|
assert_eq!(response["type"], json!("invalid_request"));
|
||||||
assert_eq!(response["link"], json!("https://docs.meilisearch.com/errors#malformed-payload"));
|
assert_eq!(response["link"], json!("https://docs.meilisearch.com/errors#malformed_payload"));
|
||||||
assert_eq!(
|
assert_eq!(
|
||||||
response["message"],
|
response["message"],
|
||||||
json!(
|
json!(
|
||||||
@ -265,7 +265,7 @@ async fn error_api_key_malformed_payload() {
|
|||||||
assert_eq!(status_code, 400);
|
assert_eq!(status_code, 400);
|
||||||
assert_eq!(response["code"], json!("malformed_payload"));
|
assert_eq!(response["code"], json!("malformed_payload"));
|
||||||
assert_eq!(response["type"], json!("invalid_request"));
|
assert_eq!(response["type"], json!("invalid_request"));
|
||||||
assert_eq!(response["link"], json!("https://docs.meilisearch.com/errors#malformed-payload"));
|
assert_eq!(response["link"], json!("https://docs.meilisearch.com/errors#malformed_payload"));
|
||||||
assert_eq!(
|
assert_eq!(
|
||||||
response["message"],
|
response["message"],
|
||||||
json!(
|
json!(
|
||||||
|
@ -56,7 +56,7 @@ static INVALID_RESPONSE: Lazy<Value> = Lazy::new(|| {
|
|||||||
json!({"message": "The provided API key is invalid.",
|
json!({"message": "The provided API key is invalid.",
|
||||||
"code": "invalid_api_key",
|
"code": "invalid_api_key",
|
||||||
"type": "auth",
|
"type": "auth",
|
||||||
"link": "https://docs.meilisearch.com/errors#invalid-api-key"
|
"link": "https://docs.meilisearch.com/errors#invalid_api_key"
|
||||||
})
|
})
|
||||||
});
|
});
|
||||||
|
|
||||||
|
@ -88,7 +88,7 @@ async fn error_json_bad_content_type() {
|
|||||||
"message": r#"A Content-Type header is missing. Accepted values for the Content-Type header are: `application/json`"#,
|
"message": r#"A Content-Type header is missing. Accepted values for the Content-Type header are: `application/json`"#,
|
||||||
"code": "missing_content_type",
|
"code": "missing_content_type",
|
||||||
"type": "invalid_request",
|
"type": "invalid_request",
|
||||||
"link": "https://docs.meilisearch.com/errors#missing-content-type",
|
"link": "https://docs.meilisearch.com/errors#missing_content_type",
|
||||||
}),
|
}),
|
||||||
"when calling the route `{}` with no content-type",
|
"when calling the route `{}` with no content-type",
|
||||||
route,
|
route,
|
||||||
@ -117,7 +117,7 @@ async fn error_json_bad_content_type() {
|
|||||||
"message": expected_error_message,
|
"message": expected_error_message,
|
||||||
"code": "invalid_content_type",
|
"code": "invalid_content_type",
|
||||||
"type": "invalid_request",
|
"type": "invalid_request",
|
||||||
"link": "https://docs.meilisearch.com/errors#invalid-content-type",
|
"link": "https://docs.meilisearch.com/errors#invalid_content_type",
|
||||||
}),
|
}),
|
||||||
"when calling the route `{}` with a content-type of `{}`",
|
"when calling the route `{}` with a content-type of `{}`",
|
||||||
route,
|
route,
|
||||||
|
@ -193,7 +193,7 @@ async fn error_add_documents_test_bad_content_types() {
|
|||||||
);
|
);
|
||||||
assert_eq!(response["code"], "invalid_content_type");
|
assert_eq!(response["code"], "invalid_content_type");
|
||||||
assert_eq!(response["type"], "invalid_request");
|
assert_eq!(response["type"], "invalid_request");
|
||||||
assert_eq!(response["link"], "https://docs.meilisearch.com/errors#invalid-content-type");
|
assert_eq!(response["link"], "https://docs.meilisearch.com/errors#invalid_content_type");
|
||||||
|
|
||||||
// put
|
// put
|
||||||
let req = test::TestRequest::put()
|
let req = test::TestRequest::put()
|
||||||
@ -214,7 +214,7 @@ async fn error_add_documents_test_bad_content_types() {
|
|||||||
);
|
);
|
||||||
assert_eq!(response["code"], "invalid_content_type");
|
assert_eq!(response["code"], "invalid_content_type");
|
||||||
assert_eq!(response["type"], "invalid_request");
|
assert_eq!(response["type"], "invalid_request");
|
||||||
assert_eq!(response["link"], "https://docs.meilisearch.com/errors#invalid-content-type");
|
assert_eq!(response["link"], "https://docs.meilisearch.com/errors#invalid_content_type");
|
||||||
}
|
}
|
||||||
|
|
||||||
/// missing content-type must be refused
|
/// missing content-type must be refused
|
||||||
@ -248,7 +248,7 @@ async fn error_add_documents_test_no_content_type() {
|
|||||||
);
|
);
|
||||||
assert_eq!(response["code"], "missing_content_type");
|
assert_eq!(response["code"], "missing_content_type");
|
||||||
assert_eq!(response["type"], "invalid_request");
|
assert_eq!(response["type"], "invalid_request");
|
||||||
assert_eq!(response["link"], "https://docs.meilisearch.com/errors#missing-content-type");
|
assert_eq!(response["link"], "https://docs.meilisearch.com/errors#missing_content_type");
|
||||||
|
|
||||||
// put
|
// put
|
||||||
let req = test::TestRequest::put()
|
let req = test::TestRequest::put()
|
||||||
@ -268,7 +268,7 @@ async fn error_add_documents_test_no_content_type() {
|
|||||||
);
|
);
|
||||||
assert_eq!(response["code"], "missing_content_type");
|
assert_eq!(response["code"], "missing_content_type");
|
||||||
assert_eq!(response["type"], "invalid_request");
|
assert_eq!(response["type"], "invalid_request");
|
||||||
assert_eq!(response["link"], "https://docs.meilisearch.com/errors#missing-content-type");
|
assert_eq!(response["link"], "https://docs.meilisearch.com/errors#missing_content_type");
|
||||||
}
|
}
|
||||||
|
|
||||||
#[actix_rt::test]
|
#[actix_rt::test]
|
||||||
@ -297,7 +297,7 @@ async fn error_add_malformed_csv_documents() {
|
|||||||
);
|
);
|
||||||
assert_eq!(response["code"], json!("malformed_payload"));
|
assert_eq!(response["code"], json!("malformed_payload"));
|
||||||
assert_eq!(response["type"], json!("invalid_request"));
|
assert_eq!(response["type"], json!("invalid_request"));
|
||||||
assert_eq!(response["link"], json!("https://docs.meilisearch.com/errors#malformed-payload"));
|
assert_eq!(response["link"], json!("https://docs.meilisearch.com/errors#malformed_payload"));
|
||||||
|
|
||||||
// put
|
// put
|
||||||
let req = test::TestRequest::put()
|
let req = test::TestRequest::put()
|
||||||
@ -318,7 +318,7 @@ async fn error_add_malformed_csv_documents() {
|
|||||||
);
|
);
|
||||||
assert_eq!(response["code"], json!("malformed_payload"));
|
assert_eq!(response["code"], json!("malformed_payload"));
|
||||||
assert_eq!(response["type"], json!("invalid_request"));
|
assert_eq!(response["type"], json!("invalid_request"));
|
||||||
assert_eq!(response["link"], json!("https://docs.meilisearch.com/errors#malformed-payload"));
|
assert_eq!(response["link"], json!("https://docs.meilisearch.com/errors#malformed_payload"));
|
||||||
}
|
}
|
||||||
|
|
||||||
#[actix_rt::test]
|
#[actix_rt::test]
|
||||||
@ -347,7 +347,7 @@ async fn error_add_malformed_json_documents() {
|
|||||||
);
|
);
|
||||||
assert_eq!(response["code"], json!("malformed_payload"));
|
assert_eq!(response["code"], json!("malformed_payload"));
|
||||||
assert_eq!(response["type"], json!("invalid_request"));
|
assert_eq!(response["type"], json!("invalid_request"));
|
||||||
assert_eq!(response["link"], json!("https://docs.meilisearch.com/errors#malformed-payload"));
|
assert_eq!(response["link"], json!("https://docs.meilisearch.com/errors#malformed_payload"));
|
||||||
|
|
||||||
// put
|
// put
|
||||||
let req = test::TestRequest::put()
|
let req = test::TestRequest::put()
|
||||||
@ -368,7 +368,7 @@ async fn error_add_malformed_json_documents() {
|
|||||||
);
|
);
|
||||||
assert_eq!(response["code"], json!("malformed_payload"));
|
assert_eq!(response["code"], json!("malformed_payload"));
|
||||||
assert_eq!(response["type"], json!("invalid_request"));
|
assert_eq!(response["type"], json!("invalid_request"));
|
||||||
assert_eq!(response["link"], json!("https://docs.meilisearch.com/errors#malformed-payload"));
|
assert_eq!(response["link"], json!("https://docs.meilisearch.com/errors#malformed_payload"));
|
||||||
|
|
||||||
// truncate
|
// truncate
|
||||||
|
|
||||||
@ -393,7 +393,7 @@ async fn error_add_malformed_json_documents() {
|
|||||||
);
|
);
|
||||||
assert_eq!(response["code"], json!("malformed_payload"));
|
assert_eq!(response["code"], json!("malformed_payload"));
|
||||||
assert_eq!(response["type"], json!("invalid_request"));
|
assert_eq!(response["type"], json!("invalid_request"));
|
||||||
assert_eq!(response["link"], json!("https://docs.meilisearch.com/errors#malformed-payload"));
|
assert_eq!(response["link"], json!("https://docs.meilisearch.com/errors#malformed_payload"));
|
||||||
|
|
||||||
// add one more char to the long string to test if the truncating works.
|
// add one more char to the long string to test if the truncating works.
|
||||||
let document = format!("\"{}m\"", long);
|
let document = format!("\"{}m\"", long);
|
||||||
@ -412,7 +412,7 @@ async fn error_add_malformed_json_documents() {
|
|||||||
);
|
);
|
||||||
assert_eq!(response["code"], json!("malformed_payload"));
|
assert_eq!(response["code"], json!("malformed_payload"));
|
||||||
assert_eq!(response["type"], json!("invalid_request"));
|
assert_eq!(response["type"], json!("invalid_request"));
|
||||||
assert_eq!(response["link"], json!("https://docs.meilisearch.com/errors#malformed-payload"));
|
assert_eq!(response["link"], json!("https://docs.meilisearch.com/errors#malformed_payload"));
|
||||||
}
|
}
|
||||||
|
|
||||||
#[actix_rt::test]
|
#[actix_rt::test]
|
||||||
@ -441,7 +441,7 @@ async fn error_add_malformed_ndjson_documents() {
|
|||||||
);
|
);
|
||||||
assert_eq!(response["code"], json!("malformed_payload"));
|
assert_eq!(response["code"], json!("malformed_payload"));
|
||||||
assert_eq!(response["type"], json!("invalid_request"));
|
assert_eq!(response["type"], json!("invalid_request"));
|
||||||
assert_eq!(response["link"], json!("https://docs.meilisearch.com/errors#malformed-payload"));
|
assert_eq!(response["link"], json!("https://docs.meilisearch.com/errors#malformed_payload"));
|
||||||
|
|
||||||
// put
|
// put
|
||||||
let req = test::TestRequest::put()
|
let req = test::TestRequest::put()
|
||||||
@ -460,7 +460,7 @@ async fn error_add_malformed_ndjson_documents() {
|
|||||||
);
|
);
|
||||||
assert_eq!(response["code"], json!("malformed_payload"));
|
assert_eq!(response["code"], json!("malformed_payload"));
|
||||||
assert_eq!(response["type"], json!("invalid_request"));
|
assert_eq!(response["type"], json!("invalid_request"));
|
||||||
assert_eq!(response["link"], json!("https://docs.meilisearch.com/errors#malformed-payload"));
|
assert_eq!(response["link"], json!("https://docs.meilisearch.com/errors#malformed_payload"));
|
||||||
}
|
}
|
||||||
|
|
||||||
#[actix_rt::test]
|
#[actix_rt::test]
|
||||||
@ -484,7 +484,7 @@ async fn error_add_missing_payload_csv_documents() {
|
|||||||
assert_eq!(response["message"], json!(r#"A csv payload is missing."#));
|
assert_eq!(response["message"], json!(r#"A csv payload is missing."#));
|
||||||
assert_eq!(response["code"], json!("missing_payload"));
|
assert_eq!(response["code"], json!("missing_payload"));
|
||||||
assert_eq!(response["type"], json!("invalid_request"));
|
assert_eq!(response["type"], json!("invalid_request"));
|
||||||
assert_eq!(response["link"], json!("https://docs.meilisearch.com/errors#missing-payload"));
|
assert_eq!(response["link"], json!("https://docs.meilisearch.com/errors#missing_payload"));
|
||||||
|
|
||||||
// put
|
// put
|
||||||
let req = test::TestRequest::put()
|
let req = test::TestRequest::put()
|
||||||
@ -500,7 +500,7 @@ async fn error_add_missing_payload_csv_documents() {
|
|||||||
assert_eq!(response["message"], json!(r#"A csv payload is missing."#));
|
assert_eq!(response["message"], json!(r#"A csv payload is missing."#));
|
||||||
assert_eq!(response["code"], json!("missing_payload"));
|
assert_eq!(response["code"], json!("missing_payload"));
|
||||||
assert_eq!(response["type"], json!("invalid_request"));
|
assert_eq!(response["type"], json!("invalid_request"));
|
||||||
assert_eq!(response["link"], json!("https://docs.meilisearch.com/errors#missing-payload"));
|
assert_eq!(response["link"], json!("https://docs.meilisearch.com/errors#missing_payload"));
|
||||||
}
|
}
|
||||||
|
|
||||||
#[actix_rt::test]
|
#[actix_rt::test]
|
||||||
@ -524,7 +524,7 @@ async fn error_add_missing_payload_json_documents() {
|
|||||||
assert_eq!(response["message"], json!(r#"A json payload is missing."#));
|
assert_eq!(response["message"], json!(r#"A json payload is missing."#));
|
||||||
assert_eq!(response["code"], json!("missing_payload"));
|
assert_eq!(response["code"], json!("missing_payload"));
|
||||||
assert_eq!(response["type"], json!("invalid_request"));
|
assert_eq!(response["type"], json!("invalid_request"));
|
||||||
assert_eq!(response["link"], json!("https://docs.meilisearch.com/errors#missing-payload"));
|
assert_eq!(response["link"], json!("https://docs.meilisearch.com/errors#missing_payload"));
|
||||||
|
|
||||||
// put
|
// put
|
||||||
let req = test::TestRequest::put()
|
let req = test::TestRequest::put()
|
||||||
@ -540,7 +540,7 @@ async fn error_add_missing_payload_json_documents() {
|
|||||||
assert_eq!(response["message"], json!(r#"A json payload is missing."#));
|
assert_eq!(response["message"], json!(r#"A json payload is missing."#));
|
||||||
assert_eq!(response["code"], json!("missing_payload"));
|
assert_eq!(response["code"], json!("missing_payload"));
|
||||||
assert_eq!(response["type"], json!("invalid_request"));
|
assert_eq!(response["type"], json!("invalid_request"));
|
||||||
assert_eq!(response["link"], json!("https://docs.meilisearch.com/errors#missing-payload"));
|
assert_eq!(response["link"], json!("https://docs.meilisearch.com/errors#missing_payload"));
|
||||||
}
|
}
|
||||||
|
|
||||||
#[actix_rt::test]
|
#[actix_rt::test]
|
||||||
@ -564,7 +564,7 @@ async fn error_add_missing_payload_ndjson_documents() {
|
|||||||
assert_eq!(response["message"], json!(r#"A ndjson payload is missing."#));
|
assert_eq!(response["message"], json!(r#"A ndjson payload is missing."#));
|
||||||
assert_eq!(response["code"], json!("missing_payload"));
|
assert_eq!(response["code"], json!("missing_payload"));
|
||||||
assert_eq!(response["type"], json!("invalid_request"));
|
assert_eq!(response["type"], json!("invalid_request"));
|
||||||
assert_eq!(response["link"], json!("https://docs.meilisearch.com/errors#missing-payload"));
|
assert_eq!(response["link"], json!("https://docs.meilisearch.com/errors#missing_payload"));
|
||||||
|
|
||||||
// put
|
// put
|
||||||
let req = test::TestRequest::put()
|
let req = test::TestRequest::put()
|
||||||
@ -580,7 +580,7 @@ async fn error_add_missing_payload_ndjson_documents() {
|
|||||||
assert_eq!(response["message"], json!(r#"A ndjson payload is missing."#));
|
assert_eq!(response["message"], json!(r#"A ndjson payload is missing."#));
|
||||||
assert_eq!(response["code"], json!("missing_payload"));
|
assert_eq!(response["code"], json!("missing_payload"));
|
||||||
assert_eq!(response["type"], json!("invalid_request"));
|
assert_eq!(response["type"], json!("invalid_request"));
|
||||||
assert_eq!(response["link"], json!("https://docs.meilisearch.com/errors#missing-payload"));
|
assert_eq!(response["link"], json!("https://docs.meilisearch.com/errors#missing_payload"));
|
||||||
}
|
}
|
||||||
|
|
||||||
#[actix_rt::test]
|
#[actix_rt::test]
|
||||||
@ -639,7 +639,7 @@ async fn error_document_add_create_index_bad_uid() {
|
|||||||
"message": "`883 fj!` is not a valid index uid. Index uid can be an integer or a string containing only alphanumeric characters, hyphens (-) and underscores (_).",
|
"message": "`883 fj!` is not a valid index uid. Index uid can be an integer or a string containing only alphanumeric characters, hyphens (-) and underscores (_).",
|
||||||
"code": "invalid_index_uid",
|
"code": "invalid_index_uid",
|
||||||
"type": "invalid_request",
|
"type": "invalid_request",
|
||||||
"link": "https://docs.meilisearch.com/errors#invalid-index-uid"
|
"link": "https://docs.meilisearch.com/errors#invalid_index_uid"
|
||||||
});
|
});
|
||||||
|
|
||||||
assert_eq!(code, 400);
|
assert_eq!(code, 400);
|
||||||
@ -781,7 +781,7 @@ async fn error_add_documents_bad_document_id() {
|
|||||||
assert_eq!(response["error"]["type"], json!("invalid_request"));
|
assert_eq!(response["error"]["type"], json!("invalid_request"));
|
||||||
assert_eq!(
|
assert_eq!(
|
||||||
response["error"]["link"],
|
response["error"]["link"],
|
||||||
json!("https://docs.meilisearch.com/errors#invalid-document-id")
|
json!("https://docs.meilisearch.com/errors#invalid_document_id")
|
||||||
);
|
);
|
||||||
}
|
}
|
||||||
|
|
||||||
@ -809,7 +809,7 @@ async fn error_add_documents_missing_document_id() {
|
|||||||
assert_eq!(response["error"]["type"], json!("invalid_request"));
|
assert_eq!(response["error"]["type"], json!("invalid_request"));
|
||||||
assert_eq!(
|
assert_eq!(
|
||||||
response["error"]["link"],
|
response["error"]["link"],
|
||||||
json!("https://docs.meilisearch.com/errors#missing-document-id")
|
json!("https://docs.meilisearch.com/errors#missing_document_id")
|
||||||
);
|
);
|
||||||
}
|
}
|
||||||
|
|
||||||
@ -843,7 +843,7 @@ async fn error_document_field_limit_reached() {
|
|||||||
"message": "A document cannot contain more than 65,535 fields.",
|
"message": "A document cannot contain more than 65,535 fields.",
|
||||||
"code": "document_fields_limit_reached",
|
"code": "document_fields_limit_reached",
|
||||||
"type": "invalid_request",
|
"type": "invalid_request",
|
||||||
"link": "https://docs.meilisearch.com/errors#document-fields-limit-reached"
|
"link": "https://docs.meilisearch.com/errors#document_fields_limit_reached"
|
||||||
});
|
});
|
||||||
|
|
||||||
assert_eq!(response["error"], expected_error);
|
assert_eq!(response["error"], expected_error);
|
||||||
@ -889,7 +889,7 @@ async fn error_add_documents_payload_size() {
|
|||||||
"message": "The provided payload reached the size limit.",
|
"message": "The provided payload reached the size limit.",
|
||||||
"code": "payload_too_large",
|
"code": "payload_too_large",
|
||||||
"type": "invalid_request",
|
"type": "invalid_request",
|
||||||
"link": "https://docs.meilisearch.com/errors#payload-too-large"
|
"link": "https://docs.meilisearch.com/errors#payload_too_large"
|
||||||
});
|
});
|
||||||
|
|
||||||
assert_eq!(response, expected_response);
|
assert_eq!(response, expected_response);
|
||||||
|
@ -95,7 +95,7 @@ async fn error_delete_batch_unexisting_index() {
|
|||||||
"message": "Index `test` not found.",
|
"message": "Index `test` not found.",
|
||||||
"code": "index_not_found",
|
"code": "index_not_found",
|
||||||
"type": "invalid_request",
|
"type": "invalid_request",
|
||||||
"link": "https://docs.meilisearch.com/errors#index-not-found"
|
"link": "https://docs.meilisearch.com/errors#index_not_found"
|
||||||
});
|
});
|
||||||
assert_eq!(code, 202);
|
assert_eq!(code, 202);
|
||||||
|
|
||||||
|
@ -27,7 +27,7 @@ async fn error_get_unexisting_document() {
|
|||||||
"message": "Document `1` not found.",
|
"message": "Document `1` not found.",
|
||||||
"code": "document_not_found",
|
"code": "document_not_found",
|
||||||
"type": "invalid_request",
|
"type": "invalid_request",
|
||||||
"link": "https://docs.meilisearch.com/errors#document-not-found"
|
"link": "https://docs.meilisearch.com/errors#document_not_found"
|
||||||
});
|
});
|
||||||
|
|
||||||
assert_eq!(response, expected_response);
|
assert_eq!(response, expected_response);
|
||||||
@ -90,7 +90,7 @@ async fn error_get_unexisting_index_all_documents() {
|
|||||||
"message": "Index `test` not found.",
|
"message": "Index `test` not found.",
|
||||||
"code": "index_not_found",
|
"code": "index_not_found",
|
||||||
"type": "invalid_request",
|
"type": "invalid_request",
|
||||||
"link": "https://docs.meilisearch.com/errors#index-not-found"
|
"link": "https://docs.meilisearch.com/errors#index_not_found"
|
||||||
});
|
});
|
||||||
|
|
||||||
assert_eq!(response, expected_response);
|
assert_eq!(response, expected_response);
|
||||||
|
@ -13,7 +13,7 @@ async fn error_document_update_create_index_bad_uid() {
|
|||||||
"message": "`883 fj!` is not a valid index uid. Index uid can be an integer or a string containing only alphanumeric characters, hyphens (-) and underscores (_).",
|
"message": "`883 fj!` is not a valid index uid. Index uid can be an integer or a string containing only alphanumeric characters, hyphens (-) and underscores (_).",
|
||||||
"code": "invalid_index_uid",
|
"code": "invalid_index_uid",
|
||||||
"type": "invalid_request",
|
"type": "invalid_request",
|
||||||
"link": "https://docs.meilisearch.com/errors#invalid-index-uid"
|
"link": "https://docs.meilisearch.com/errors#invalid_index_uid"
|
||||||
});
|
});
|
||||||
|
|
||||||
assert_eq!(code, 400);
|
assert_eq!(code, 400);
|
||||||
@ -167,7 +167,7 @@ async fn error_update_documents_bad_document_id() {
|
|||||||
assert_eq!(response["error"]["type"], json!("invalid_request"));
|
assert_eq!(response["error"]["type"], json!("invalid_request"));
|
||||||
assert_eq!(
|
assert_eq!(
|
||||||
response["error"]["link"],
|
response["error"]["link"],
|
||||||
json!("https://docs.meilisearch.com/errors#invalid-document-id")
|
json!("https://docs.meilisearch.com/errors#invalid_document_id")
|
||||||
);
|
);
|
||||||
}
|
}
|
||||||
|
|
||||||
@ -193,6 +193,6 @@ async fn error_update_documents_missing_document_id() {
|
|||||||
assert_eq!(response["error"]["type"], "invalid_request");
|
assert_eq!(response["error"]["type"], "invalid_request");
|
||||||
assert_eq!(
|
assert_eq!(
|
||||||
response["error"]["link"],
|
response["error"]["link"],
|
||||||
"https://docs.meilisearch.com/errors#missing-document-id"
|
"https://docs.meilisearch.com/errors#missing_document_id"
|
||||||
);
|
);
|
||||||
}
|
}
|
||||||
|
@ -177,7 +177,7 @@ async fn error_create_existing_index() {
|
|||||||
"message": "Index `test` already exists.",
|
"message": "Index `test` already exists.",
|
||||||
"code": "index_already_exists",
|
"code": "index_already_exists",
|
||||||
"type": "invalid_request",
|
"type": "invalid_request",
|
||||||
"link":"https://docs.meilisearch.com/errors#index-already-exists"
|
"link":"https://docs.meilisearch.com/errors#index_already_exists"
|
||||||
});
|
});
|
||||||
|
|
||||||
assert_eq!(response["error"], expected_response);
|
assert_eq!(response["error"], expected_response);
|
||||||
|
@ -35,7 +35,7 @@ async fn error_delete_unexisting_index() {
|
|||||||
"message": "Index `test` not found.",
|
"message": "Index `test` not found.",
|
||||||
"code": "index_not_found",
|
"code": "index_not_found",
|
||||||
"type": "invalid_request",
|
"type": "invalid_request",
|
||||||
"link": "https://docs.meilisearch.com/errors#index-not-found"
|
"link": "https://docs.meilisearch.com/errors#index_not_found"
|
||||||
});
|
});
|
||||||
|
|
||||||
let response = index.wait_task(0).await;
|
let response = index.wait_task(0).await;
|
||||||
|
@ -35,7 +35,7 @@ async fn error_get_unexisting_index() {
|
|||||||
"message": "Index `test` not found.",
|
"message": "Index `test` not found.",
|
||||||
"code": "index_not_found",
|
"code": "index_not_found",
|
||||||
"type": "invalid_request",
|
"type": "invalid_request",
|
||||||
"link": "https://docs.meilisearch.com/errors#index-not-found"
|
"link": "https://docs.meilisearch.com/errors#index_not_found"
|
||||||
});
|
});
|
||||||
|
|
||||||
assert_eq!(response, expected_response);
|
assert_eq!(response, expected_response);
|
||||||
|
@ -55,7 +55,7 @@ async fn error_get_stats_unexisting_index() {
|
|||||||
"message": "Index `test` not found.",
|
"message": "Index `test` not found.",
|
||||||
"code": "index_not_found",
|
"code": "index_not_found",
|
||||||
"type": "invalid_request",
|
"type": "invalid_request",
|
||||||
"link": "https://docs.meilisearch.com/errors#index-not-found"
|
"link": "https://docs.meilisearch.com/errors#index_not_found"
|
||||||
});
|
});
|
||||||
|
|
||||||
assert_eq!(response, expected_response);
|
assert_eq!(response, expected_response);
|
||||||
|
@ -98,7 +98,7 @@ async fn error_update_existing_primary_key() {
|
|||||||
"message": "Index already has a primary key: `id`.",
|
"message": "Index already has a primary key: `id`.",
|
||||||
"code": "index_primary_key_already_exists",
|
"code": "index_primary_key_already_exists",
|
||||||
"type": "invalid_request",
|
"type": "invalid_request",
|
||||||
"link": "https://docs.meilisearch.com/errors#index-primary-key-already-exists"
|
"link": "https://docs.meilisearch.com/errors#index_primary_key_already_exists"
|
||||||
});
|
});
|
||||||
|
|
||||||
assert_eq!(response["error"], expected_response);
|
assert_eq!(response["error"], expected_response);
|
||||||
@ -117,7 +117,7 @@ async fn error_update_unexisting_index() {
|
|||||||
"message": "Index `test` not found.",
|
"message": "Index `test` not found.",
|
||||||
"code": "index_not_found",
|
"code": "index_not_found",
|
||||||
"type": "invalid_request",
|
"type": "invalid_request",
|
||||||
"link": "https://docs.meilisearch.com/errors#index-not-found"
|
"link": "https://docs.meilisearch.com/errors#index_not_found"
|
||||||
});
|
});
|
||||||
|
|
||||||
assert_eq!(response["error"], expected_response);
|
assert_eq!(response["error"], expected_response);
|
||||||
|
@ -13,7 +13,7 @@ async fn search_unexisting_index() {
|
|||||||
"message": "Index `test` not found.",
|
"message": "Index `test` not found.",
|
||||||
"code": "index_not_found",
|
"code": "index_not_found",
|
||||||
"type": "invalid_request",
|
"type": "invalid_request",
|
||||||
"link": "https://docs.meilisearch.com/errors#index-not-found"
|
"link": "https://docs.meilisearch.com/errors#index_not_found"
|
||||||
});
|
});
|
||||||
|
|
||||||
index
|
index
|
||||||
@ -449,7 +449,7 @@ async fn filter_invalid_syntax_object() {
|
|||||||
"message": "Was expecting an operation `=`, `!=`, `>=`, `>`, `<=`, `<`, `IN`, `NOT IN`, `TO`, `EXISTS`, `NOT EXISTS`, or `_geoRadius` at `title & Glass`.\n1:14 title & Glass",
|
"message": "Was expecting an operation `=`, `!=`, `>=`, `>`, `<=`, `<`, `IN`, `NOT IN`, `TO`, `EXISTS`, `NOT EXISTS`, or `_geoRadius` at `title & Glass`.\n1:14 title & Glass",
|
||||||
"code": "invalid_search_filter",
|
"code": "invalid_search_filter",
|
||||||
"type": "invalid_request",
|
"type": "invalid_request",
|
||||||
"link": "https://docs.meilisearch.com/errors#invalid-search-filter"
|
"link": "https://docs.meilisearch.com/errors#invalid_search_filter"
|
||||||
});
|
});
|
||||||
index
|
index
|
||||||
.search(json!({"filter": "title & Glass"}), |response, code| {
|
.search(json!({"filter": "title & Glass"}), |response, code| {
|
||||||
@ -474,7 +474,7 @@ async fn filter_invalid_syntax_array() {
|
|||||||
"message": "Was expecting an operation `=`, `!=`, `>=`, `>`, `<=`, `<`, `IN`, `NOT IN`, `TO`, `EXISTS`, `NOT EXISTS`, or `_geoRadius` at `title & Glass`.\n1:14 title & Glass",
|
"message": "Was expecting an operation `=`, `!=`, `>=`, `>`, `<=`, `<`, `IN`, `NOT IN`, `TO`, `EXISTS`, `NOT EXISTS`, or `_geoRadius` at `title & Glass`.\n1:14 title & Glass",
|
||||||
"code": "invalid_search_filter",
|
"code": "invalid_search_filter",
|
||||||
"type": "invalid_request",
|
"type": "invalid_request",
|
||||||
"link": "https://docs.meilisearch.com/errors#invalid-search-filter"
|
"link": "https://docs.meilisearch.com/errors#invalid_search_filter"
|
||||||
});
|
});
|
||||||
index
|
index
|
||||||
.search(json!({"filter": ["title & Glass"]}), |response, code| {
|
.search(json!({"filter": ["title & Glass"]}), |response, code| {
|
||||||
@ -499,7 +499,7 @@ async fn filter_invalid_syntax_string() {
|
|||||||
"message": "Found unexpected characters at the end of the filter: `XOR title = Glass`. You probably forgot an `OR` or an `AND` rule.\n15:32 title = Glass XOR title = Glass",
|
"message": "Found unexpected characters at the end of the filter: `XOR title = Glass`. You probably forgot an `OR` or an `AND` rule.\n15:32 title = Glass XOR title = Glass",
|
||||||
"code": "invalid_search_filter",
|
"code": "invalid_search_filter",
|
||||||
"type": "invalid_request",
|
"type": "invalid_request",
|
||||||
"link": "https://docs.meilisearch.com/errors#invalid-search-filter"
|
"link": "https://docs.meilisearch.com/errors#invalid_search_filter"
|
||||||
});
|
});
|
||||||
index
|
index
|
||||||
.search(json!({"filter": "title = Glass XOR title = Glass"}), |response, code| {
|
.search(json!({"filter": "title = Glass XOR title = Glass"}), |response, code| {
|
||||||
@ -524,7 +524,7 @@ async fn filter_invalid_attribute_array() {
|
|||||||
"message": "Attribute `many` is not filterable. Available filterable attributes are: `title`.\n1:5 many = Glass",
|
"message": "Attribute `many` is not filterable. Available filterable attributes are: `title`.\n1:5 many = Glass",
|
||||||
"code": "invalid_search_filter",
|
"code": "invalid_search_filter",
|
||||||
"type": "invalid_request",
|
"type": "invalid_request",
|
||||||
"link": "https://docs.meilisearch.com/errors#invalid-search-filter"
|
"link": "https://docs.meilisearch.com/errors#invalid_search_filter"
|
||||||
});
|
});
|
||||||
index
|
index
|
||||||
.search(json!({"filter": ["many = Glass"]}), |response, code| {
|
.search(json!({"filter": ["many = Glass"]}), |response, code| {
|
||||||
@ -549,7 +549,7 @@ async fn filter_invalid_attribute_string() {
|
|||||||
"message": "Attribute `many` is not filterable. Available filterable attributes are: `title`.\n1:5 many = Glass",
|
"message": "Attribute `many` is not filterable. Available filterable attributes are: `title`.\n1:5 many = Glass",
|
||||||
"code": "invalid_search_filter",
|
"code": "invalid_search_filter",
|
||||||
"type": "invalid_request",
|
"type": "invalid_request",
|
||||||
"link": "https://docs.meilisearch.com/errors#invalid-search-filter"
|
"link": "https://docs.meilisearch.com/errors#invalid_search_filter"
|
||||||
});
|
});
|
||||||
index
|
index
|
||||||
.search(json!({"filter": "many = Glass"}), |response, code| {
|
.search(json!({"filter": "many = Glass"}), |response, code| {
|
||||||
@ -574,7 +574,7 @@ async fn filter_reserved_geo_attribute_array() {
|
|||||||
"message": "`_geo` is a reserved keyword and thus can't be used as a filter expression. Use the _geoRadius(latitude, longitude, distance) built-in rule to filter on _geo field coordinates.\n1:5 _geo = Glass",
|
"message": "`_geo` is a reserved keyword and thus can't be used as a filter expression. Use the _geoRadius(latitude, longitude, distance) built-in rule to filter on _geo field coordinates.\n1:5 _geo = Glass",
|
||||||
"code": "invalid_search_filter",
|
"code": "invalid_search_filter",
|
||||||
"type": "invalid_request",
|
"type": "invalid_request",
|
||||||
"link": "https://docs.meilisearch.com/errors#invalid-search-filter"
|
"link": "https://docs.meilisearch.com/errors#invalid_search_filter"
|
||||||
});
|
});
|
||||||
index
|
index
|
||||||
.search(json!({"filter": ["_geo = Glass"]}), |response, code| {
|
.search(json!({"filter": ["_geo = Glass"]}), |response, code| {
|
||||||
@ -599,7 +599,7 @@ async fn filter_reserved_geo_attribute_string() {
|
|||||||
"message": "`_geo` is a reserved keyword and thus can't be used as a filter expression. Use the _geoRadius(latitude, longitude, distance) built-in rule to filter on _geo field coordinates.\n1:5 _geo = Glass",
|
"message": "`_geo` is a reserved keyword and thus can't be used as a filter expression. Use the _geoRadius(latitude, longitude, distance) built-in rule to filter on _geo field coordinates.\n1:5 _geo = Glass",
|
||||||
"code": "invalid_search_filter",
|
"code": "invalid_search_filter",
|
||||||
"type": "invalid_request",
|
"type": "invalid_request",
|
||||||
"link": "https://docs.meilisearch.com/errors#invalid-search-filter"
|
"link": "https://docs.meilisearch.com/errors#invalid_search_filter"
|
||||||
});
|
});
|
||||||
index
|
index
|
||||||
.search(json!({"filter": "_geo = Glass"}), |response, code| {
|
.search(json!({"filter": "_geo = Glass"}), |response, code| {
|
||||||
@ -624,7 +624,7 @@ async fn filter_reserved_attribute_array() {
|
|||||||
"message": "`_geoDistance` is a reserved keyword and thus can't be used as a filter expression.\n1:13 _geoDistance = Glass",
|
"message": "`_geoDistance` is a reserved keyword and thus can't be used as a filter expression.\n1:13 _geoDistance = Glass",
|
||||||
"code": "invalid_search_filter",
|
"code": "invalid_search_filter",
|
||||||
"type": "invalid_request",
|
"type": "invalid_request",
|
||||||
"link": "https://docs.meilisearch.com/errors#invalid-search-filter"
|
"link": "https://docs.meilisearch.com/errors#invalid_search_filter"
|
||||||
});
|
});
|
||||||
index
|
index
|
||||||
.search(json!({"filter": ["_geoDistance = Glass"]}), |response, code| {
|
.search(json!({"filter": ["_geoDistance = Glass"]}), |response, code| {
|
||||||
@ -649,7 +649,7 @@ async fn filter_reserved_attribute_string() {
|
|||||||
"message": "`_geoDistance` is a reserved keyword and thus can't be used as a filter expression.\n1:13 _geoDistance = Glass",
|
"message": "`_geoDistance` is a reserved keyword and thus can't be used as a filter expression.\n1:13 _geoDistance = Glass",
|
||||||
"code": "invalid_search_filter",
|
"code": "invalid_search_filter",
|
||||||
"type": "invalid_request",
|
"type": "invalid_request",
|
||||||
"link": "https://docs.meilisearch.com/errors#invalid-search-filter"
|
"link": "https://docs.meilisearch.com/errors#invalid_search_filter"
|
||||||
});
|
});
|
||||||
index
|
index
|
||||||
.search(json!({"filter": "_geoDistance = Glass"}), |response, code| {
|
.search(json!({"filter": "_geoDistance = Glass"}), |response, code| {
|
||||||
@ -674,7 +674,7 @@ async fn sort_geo_reserved_attribute() {
|
|||||||
"message": "`_geo` is a reserved keyword and thus can't be used as a sort expression. Use the _geoPoint(latitude, longitude) built-in rule to sort on _geo field coordinates.",
|
"message": "`_geo` is a reserved keyword and thus can't be used as a sort expression. Use the _geoPoint(latitude, longitude) built-in rule to sort on _geo field coordinates.",
|
||||||
"code": "invalid_search_sort",
|
"code": "invalid_search_sort",
|
||||||
"type": "invalid_request",
|
"type": "invalid_request",
|
||||||
"link": "https://docs.meilisearch.com/errors#invalid-search-sort"
|
"link": "https://docs.meilisearch.com/errors#invalid_search_sort"
|
||||||
});
|
});
|
||||||
index
|
index
|
||||||
.search(
|
.search(
|
||||||
@ -704,7 +704,7 @@ async fn sort_reserved_attribute() {
|
|||||||
"message": "`_geoDistance` is a reserved keyword and thus can't be used as a sort expression.",
|
"message": "`_geoDistance` is a reserved keyword and thus can't be used as a sort expression.",
|
||||||
"code": "invalid_search_sort",
|
"code": "invalid_search_sort",
|
||||||
"type": "invalid_request",
|
"type": "invalid_request",
|
||||||
"link": "https://docs.meilisearch.com/errors#invalid-search-sort"
|
"link": "https://docs.meilisearch.com/errors#invalid_search_sort"
|
||||||
});
|
});
|
||||||
index
|
index
|
||||||
.search(
|
.search(
|
||||||
@ -734,7 +734,7 @@ async fn sort_unsortable_attribute() {
|
|||||||
"message": "Attribute `title` is not sortable. Available sortable attributes are: `id`.",
|
"message": "Attribute `title` is not sortable. Available sortable attributes are: `id`.",
|
||||||
"code": "invalid_search_sort",
|
"code": "invalid_search_sort",
|
||||||
"type": "invalid_request",
|
"type": "invalid_request",
|
||||||
"link": "https://docs.meilisearch.com/errors#invalid-search-sort"
|
"link": "https://docs.meilisearch.com/errors#invalid_search_sort"
|
||||||
});
|
});
|
||||||
index
|
index
|
||||||
.search(
|
.search(
|
||||||
@ -764,7 +764,7 @@ async fn sort_invalid_syntax() {
|
|||||||
"message": "Invalid syntax for the sort parameter: expected expression ending by `:asc` or `:desc`, found `title`.",
|
"message": "Invalid syntax for the sort parameter: expected expression ending by `:asc` or `:desc`, found `title`.",
|
||||||
"code": "invalid_search_sort",
|
"code": "invalid_search_sort",
|
||||||
"type": "invalid_request",
|
"type": "invalid_request",
|
||||||
"link": "https://docs.meilisearch.com/errors#invalid-search-sort"
|
"link": "https://docs.meilisearch.com/errors#invalid_search_sort"
|
||||||
});
|
});
|
||||||
index
|
index
|
||||||
.search(
|
.search(
|
||||||
@ -798,7 +798,7 @@ async fn sort_unset_ranking_rule() {
|
|||||||
"message": "The sort ranking rule must be specified in the ranking rules settings to use the sort parameter at search time.",
|
"message": "The sort ranking rule must be specified in the ranking rules settings to use the sort parameter at search time.",
|
||||||
"code": "invalid_search_sort",
|
"code": "invalid_search_sort",
|
||||||
"type": "invalid_request",
|
"type": "invalid_request",
|
||||||
"link": "https://docs.meilisearch.com/errors#invalid-search-sort"
|
"link": "https://docs.meilisearch.com/errors#invalid_search_sort"
|
||||||
});
|
});
|
||||||
index
|
index
|
||||||
.search(
|
.search(
|
||||||
|
@ -19,7 +19,7 @@ async fn error_get_unexisting_task_status() {
|
|||||||
"message": "Task `1` not found.",
|
"message": "Task `1` not found.",
|
||||||
"code": "task_not_found",
|
"code": "task_not_found",
|
||||||
"type": "invalid_request",
|
"type": "invalid_request",
|
||||||
"link": "https://docs.meilisearch.com/errors#task-not-found"
|
"link": "https://docs.meilisearch.com/errors#task_not_found"
|
||||||
});
|
});
|
||||||
|
|
||||||
assert_eq!(response, expected_response);
|
assert_eq!(response, expected_response);
|
||||||
|
Loading…
Reference in New Issue
Block a user