mirror of
https://github.com/meilisearch/meilisearch.git
synced 2024-11-22 10:07:40 +08:00
Fixes formatting issues
This commit is contained in:
parent
d0b1ba20cb
commit
da4d47b5d0
@ -392,7 +392,8 @@ pub static VECTOR_DOCUMENTS: Lazy<Value> = Lazy::new(|| {
|
||||
|
||||
pub async fn shared_index_with_test_set() -> &'static Index<'static, Shared> {
|
||||
static INDEX: OnceCell<Index<'static, Shared>> = OnceCell::const_new();
|
||||
INDEX.get_or_init(|| async {
|
||||
INDEX
|
||||
.get_or_init(|| async {
|
||||
let server = Server::new_shared();
|
||||
let index = server._index("SHARED_TEST_SET").to_shared();
|
||||
let url = format!("/indexes/{}/documents", urlencoding::encode(index.uid.as_ref()));
|
||||
@ -407,5 +408,6 @@ pub async fn shared_index_with_test_set() -> &'static Index<'static, Shared> {
|
||||
assert_eq!(code, 202);
|
||||
index.wait_task(response.uid()).await;
|
||||
index
|
||||
}).await
|
||||
})
|
||||
.await
|
||||
}
|
@ -4,7 +4,10 @@ use meili_snap::*;
|
||||
use urlencoding::encode as urlencode;
|
||||
|
||||
use crate::common::encoder::Encoder;
|
||||
use crate::common::{shared_does_not_exists_index, shared_empty_index, shared_index_with_test_set, GetAllDocumentsOptions, Server, Value};
|
||||
use crate::common::{
|
||||
shared_does_not_exists_index, shared_empty_index, shared_index_with_test_set,
|
||||
GetAllDocumentsOptions, Server, Value,
|
||||
};
|
||||
use crate::json;
|
||||
|
||||
// TODO: partial test since we are testing error, amd error is not yet fully implemented in
|
||||
@ -191,7 +194,6 @@ async fn test_get_all_documents_offset() {
|
||||
async fn test_get_all_documents_attributes_to_retrieve() {
|
||||
let index = shared_index_with_test_set().await;
|
||||
|
||||
|
||||
let (response, code) = index
|
||||
.get_all_documents(GetAllDocumentsOptions {
|
||||
fields: Some(vec!["name"]),
|
||||
|
Loading…
Reference in New Issue
Block a user