Fix existing tests

This commit is contained in:
Louis Dureuil 2024-07-31 17:57:32 +02:00
parent 72b9005344
commit 8535dc0be2
No known key found for this signature in database
12 changed files with 49 additions and 49 deletions

View File

@ -1110,7 +1110,7 @@ async fn document_addition_with_huge_int_primary_key() {
snapshot!(response, snapshot!(response,
@r###" @r###"
{ {
"uid": 0, "uid": "[uid]",
"indexUid": "test", "indexUid": "test",
"status": "succeeded", "status": "succeeded",
"type": "documentAdditionOrUpdate", "type": "documentAdditionOrUpdate",
@ -1402,7 +1402,7 @@ async fn error_document_field_limit_reached_over_multiple_documents() {
snapshot!(response, snapshot!(response,
@r###" @r###"
{ {
"uid": 1, "uid": "[uid]",
"indexUid": "test", "indexUid": "test",
"status": "succeeded", "status": "succeeded",
"type": "documentAdditionOrUpdate", "type": "documentAdditionOrUpdate",
@ -1436,7 +1436,7 @@ async fn error_document_field_limit_reached_over_multiple_documents() {
snapshot!(response, snapshot!(response,
@r###" @r###"
{ {
"uid": 2, "uid": "[uid]",
"indexUid": "test", "indexUid": "test",
"status": "failed", "status": "failed",
"type": "documentAdditionOrUpdate", "type": "documentAdditionOrUpdate",
@ -1485,7 +1485,7 @@ async fn error_document_field_limit_reached_in_one_nested_document() {
snapshot!(response, snapshot!(response,
@r###" @r###"
{ {
"uid": 1, "uid": "[uid]",
"indexUid": "test", "indexUid": "test",
"status": "succeeded", "status": "succeeded",
"type": "documentAdditionOrUpdate", "type": "documentAdditionOrUpdate",
@ -1528,7 +1528,7 @@ async fn error_document_field_limit_reached_over_multiple_documents_with_nested_
snapshot!(response, snapshot!(response,
@r###" @r###"
{ {
"uid": 1, "uid": "[uid]",
"indexUid": "test", "indexUid": "test",
"status": "succeeded", "status": "succeeded",
"type": "documentAdditionOrUpdate", "type": "documentAdditionOrUpdate",
@ -1563,7 +1563,7 @@ async fn error_document_field_limit_reached_over_multiple_documents_with_nested_
snapshot!(response, snapshot!(response,
@r###" @r###"
{ {
"uid": 2, "uid": "[uid]",
"indexUid": "test", "indexUid": "test",
"status": "succeeded", "status": "succeeded",
"type": "documentAdditionOrUpdate", "type": "documentAdditionOrUpdate",
@ -2209,7 +2209,7 @@ async fn add_invalid_geo_and_then_settings() {
let ret = index.wait_task(ret.uid()).await; let ret = index.wait_task(ret.uid()).await;
snapshot!(ret, @r###" snapshot!(ret, @r###"
{ {
"uid": 1, "uid": "[uid]",
"indexUid": "test", "indexUid": "test",
"status": "succeeded", "status": "succeeded",
"type": "documentAdditionOrUpdate", "type": "documentAdditionOrUpdate",
@ -2231,7 +2231,7 @@ async fn add_invalid_geo_and_then_settings() {
let ret = index.wait_task(ret.uid()).await; let ret = index.wait_task(ret.uid()).await;
snapshot!(ret, @r###" snapshot!(ret, @r###"
{ {
"uid": 2, "uid": "[uid]",
"indexUid": "test", "indexUid": "test",
"status": "failed", "status": "failed",
"type": "settingsUpdate", "type": "settingsUpdate",

View File

@ -2,7 +2,7 @@
source: meilisearch/tests/dumps/mod.rs source: meilisearch/tests/dumps/mod.rs
--- ---
{ {
"uid": 0, "uid": "[uid]",
"indexUid": "pets", "indexUid": "pets",
"status": "succeeded", "status": "succeeded",
"type": "settingsUpdate", "type": "settingsUpdate",

View File

@ -2,7 +2,7 @@
source: meilisearch/tests/dumps/mod.rs source: meilisearch/tests/dumps/mod.rs
--- ---
{ {
"uid": 1, "uid": "[uid]",
"indexUid": "pets", "indexUid": "pets",
"status": "succeeded", "status": "succeeded",
"type": "documentAdditionOrUpdate", "type": "documentAdditionOrUpdate",

View File

@ -2,7 +2,7 @@
source: meilisearch/tests/search/distinct.rs source: meilisearch/tests/search/distinct.rs
--- ---
{ {
"uid": 1, "uid": "[uid]",
"indexUid": "tamo", "indexUid": "tamo",
"status": "succeeded", "status": "succeeded",
"type": "settingsUpdate", "type": "settingsUpdate",

View File

@ -2,7 +2,7 @@
source: meilisearch/tests/search/errors.rs source: meilisearch/tests/search/errors.rs
--- ---
{ {
"uid": 0, "uid": "[uid]",
"indexUid": "tamo", "indexUid": "tamo",
"status": "succeeded", "status": "succeeded",
"type": "indexCreation", "type": "indexCreation",

View File

@ -744,7 +744,7 @@ async fn test_summarized_index_deletion() {
snapshot!(task, snapshot!(task,
@r###" @r###"
{ {
"uid": 0, "uid": "[uid]",
"indexUid": "test", "indexUid": "test",
"status": "failed", "status": "failed",
"type": "indexDeletion", "type": "indexDeletion",
@ -774,7 +774,7 @@ async fn test_summarized_index_deletion() {
snapshot!(task, snapshot!(task,
@r###" @r###"
{ {
"uid": 1, "uid": "[uid]",
"indexUid": "test", "indexUid": "test",
"status": "succeeded", "status": "succeeded",
"type": "documentAdditionOrUpdate", "type": "documentAdditionOrUpdate",
@ -796,7 +796,7 @@ async fn test_summarized_index_deletion() {
snapshot!(task, snapshot!(task,
@r###" @r###"
{ {
"uid": 2, "uid": "[uid]",
"indexUid": "test", "indexUid": "test",
"status": "succeeded", "status": "succeeded",
"type": "indexDeletion", "type": "indexDeletion",
@ -818,7 +818,7 @@ async fn test_summarized_index_deletion() {
snapshot!(task, snapshot!(task,
@r###" @r###"
{ {
"uid": 3, "uid": "[uid]",
"indexUid": "test", "indexUid": "test",
"status": "failed", "status": "failed",
"type": "indexDeletion", "type": "indexDeletion",

View File

@ -235,7 +235,7 @@ async fn user_provided_embeddings_error() {
let task = index.wait_task(value.uid()).await; let task = index.wait_task(value.uid()).await;
snapshot!(task, @r###" snapshot!(task, @r###"
{ {
"uid": 2, "uid": "[uid]",
"indexUid": "doggo", "indexUid": "doggo",
"status": "failed", "status": "failed",
"type": "documentAdditionOrUpdate", "type": "documentAdditionOrUpdate",
@ -264,7 +264,7 @@ async fn user_provided_embeddings_error() {
let task = index.wait_task(value.uid()).await; let task = index.wait_task(value.uid()).await;
snapshot!(task, @r###" snapshot!(task, @r###"
{ {
"uid": 3, "uid": "[uid]",
"indexUid": "doggo", "indexUid": "doggo",
"status": "failed", "status": "failed",
"type": "documentAdditionOrUpdate", "type": "documentAdditionOrUpdate",
@ -294,7 +294,7 @@ async fn user_provided_embeddings_error() {
let task = index.wait_task(value.uid()).await; let task = index.wait_task(value.uid()).await;
snapshot!(task, @r###" snapshot!(task, @r###"
{ {
"uid": 4, "uid": "[uid]",
"indexUid": "doggo", "indexUid": "doggo",
"status": "failed", "status": "failed",
"type": "documentAdditionOrUpdate", "type": "documentAdditionOrUpdate",
@ -323,7 +323,7 @@ async fn user_provided_embeddings_error() {
let task = index.wait_task(value.uid()).await; let task = index.wait_task(value.uid()).await;
snapshot!(task, @r###" snapshot!(task, @r###"
{ {
"uid": 5, "uid": "[uid]",
"indexUid": "doggo", "indexUid": "doggo",
"status": "failed", "status": "failed",
"type": "documentAdditionOrUpdate", "type": "documentAdditionOrUpdate",
@ -352,7 +352,7 @@ async fn user_provided_embeddings_error() {
let task = index.wait_task(value.uid()).await; let task = index.wait_task(value.uid()).await;
snapshot!(task, @r###" snapshot!(task, @r###"
{ {
"uid": 6, "uid": "[uid]",
"indexUid": "doggo", "indexUid": "doggo",
"status": "failed", "status": "failed",
"type": "documentAdditionOrUpdate", "type": "documentAdditionOrUpdate",
@ -381,7 +381,7 @@ async fn user_provided_embeddings_error() {
let task = index.wait_task(value.uid()).await; let task = index.wait_task(value.uid()).await;
snapshot!(task, @r###" snapshot!(task, @r###"
{ {
"uid": 7, "uid": "[uid]",
"indexUid": "doggo", "indexUid": "doggo",
"status": "failed", "status": "failed",
"type": "documentAdditionOrUpdate", "type": "documentAdditionOrUpdate",
@ -422,7 +422,7 @@ async fn user_provided_embeddings_error() {
let task = index.wait_task(value.uid()).await; let task = index.wait_task(value.uid()).await;
snapshot!(task, @r###" snapshot!(task, @r###"
{ {
"uid": 10, "uid": "[uid]",
"indexUid": "doggo", "indexUid": "doggo",
"status": "failed", "status": "failed",
"type": "documentAdditionOrUpdate", "type": "documentAdditionOrUpdate",
@ -450,7 +450,7 @@ async fn user_provided_embeddings_error() {
let task = index.wait_task(value.uid()).await; let task = index.wait_task(value.uid()).await;
snapshot!(task, @r###" snapshot!(task, @r###"
{ {
"uid": 11, "uid": "[uid]",
"indexUid": "doggo", "indexUid": "doggo",
"status": "failed", "status": "failed",
"type": "documentAdditionOrUpdate", "type": "documentAdditionOrUpdate",
@ -478,7 +478,7 @@ async fn user_provided_embeddings_error() {
let task = index.wait_task(value.uid()).await; let task = index.wait_task(value.uid()).await;
snapshot!(task, @r###" snapshot!(task, @r###"
{ {
"uid": 12, "uid": "[uid]",
"indexUid": "doggo", "indexUid": "doggo",
"status": "failed", "status": "failed",
"type": "documentAdditionOrUpdate", "type": "documentAdditionOrUpdate",
@ -514,7 +514,7 @@ async fn user_provided_vectors_error() {
let task = index.wait_task(value.uid()).await; let task = index.wait_task(value.uid()).await;
snapshot!(task, @r###" snapshot!(task, @r###"
{ {
"uid": 2, "uid": "[uid]",
"indexUid": "doggo", "indexUid": "doggo",
"status": "failed", "status": "failed",
"type": "documentAdditionOrUpdate", "type": "documentAdditionOrUpdate",
@ -543,7 +543,7 @@ async fn user_provided_vectors_error() {
let task = index.wait_task(value.uid()).await; let task = index.wait_task(value.uid()).await;
snapshot!(task, @r###" snapshot!(task, @r###"
{ {
"uid": 3, "uid": "[uid]",
"indexUid": "doggo", "indexUid": "doggo",
"status": "failed", "status": "failed",
"type": "documentAdditionOrUpdate", "type": "documentAdditionOrUpdate",
@ -572,7 +572,7 @@ async fn user_provided_vectors_error() {
let task = index.wait_task(value.uid()).await; let task = index.wait_task(value.uid()).await;
snapshot!(task, @r###" snapshot!(task, @r###"
{ {
"uid": 4, "uid": "[uid]",
"indexUid": "doggo", "indexUid": "doggo",
"status": "failed", "status": "failed",
"type": "documentAdditionOrUpdate", "type": "documentAdditionOrUpdate",

View File

@ -880,7 +880,7 @@ async fn bad_settings() {
let task = server.wait_task(response.uid()).await; let task = server.wait_task(response.uid()).await;
snapshot!(task, @r###" snapshot!(task, @r###"
{ {
"uid": 0, "uid": "[uid]",
"indexUid": "doggo", "indexUid": "doggo",
"status": "failed", "status": "failed",
"type": "settingsUpdate", "type": "settingsUpdate",
@ -925,7 +925,7 @@ async fn bad_settings() {
let task = server.wait_task(response.uid()).await; let task = server.wait_task(response.uid()).await;
snapshot!(task, @r###" snapshot!(task, @r###"
{ {
"uid": 2, "uid": "[uid]",
"indexUid": "doggo", "indexUid": "doggo",
"status": "failed", "status": "failed",
"type": "documentAdditionOrUpdate", "type": "documentAdditionOrUpdate",
@ -974,7 +974,7 @@ async fn add_vector_and_user_provided() {
let task = index.wait_task(value.uid()).await; let task = index.wait_task(value.uid()).await;
snapshot!(task, @r###" snapshot!(task, @r###"
{ {
"uid": 1, "uid": "[uid]",
"indexUid": "doggo", "indexUid": "doggo",
"status": "succeeded", "status": "succeeded",
"type": "documentAdditionOrUpdate", "type": "documentAdditionOrUpdate",
@ -1070,7 +1070,7 @@ async fn server_returns_bad_request() {
let task = server.wait_task(response.uid()).await; let task = server.wait_task(response.uid()).await;
snapshot!(task, @r###" snapshot!(task, @r###"
{ {
"uid": 0, "uid": "[uid]",
"indexUid": "doggo", "indexUid": "doggo",
"status": "failed", "status": "failed",
"type": "settingsUpdate", "type": "settingsUpdate",
@ -1109,7 +1109,7 @@ async fn server_returns_bad_request() {
let task = server.wait_task(response.uid()).await; let task = server.wait_task(response.uid()).await;
snapshot!(task, @r###" snapshot!(task, @r###"
{ {
"uid": 1, "uid": "[uid]",
"indexUid": "doggo", "indexUid": "doggo",
"status": "succeeded", "status": "succeeded",
"type": "settingsUpdate", "type": "settingsUpdate",
@ -1138,7 +1138,7 @@ async fn server_returns_bad_request() {
let task = server.wait_task(response.uid()).await; let task = server.wait_task(response.uid()).await;
snapshot!(task, @r###" snapshot!(task, @r###"
{ {
"uid": 2, "uid": "[uid]",
"indexUid": "doggo", "indexUid": "doggo",
"status": "failed", "status": "failed",
"type": "documentAdditionOrUpdate", "type": "documentAdditionOrUpdate",
@ -1182,7 +1182,7 @@ async fn server_returns_bad_response() {
let task = server.wait_task(response.uid()).await; let task = server.wait_task(response.uid()).await;
snapshot!(task, @r###" snapshot!(task, @r###"
{ {
"uid": 0, "uid": "[uid]",
"indexUid": "doggo", "indexUid": "doggo",
"status": "failed", "status": "failed",
"type": "settingsUpdate", "type": "settingsUpdate",
@ -1235,7 +1235,7 @@ async fn server_returns_bad_response() {
let task = server.wait_task(response.uid()).await; let task = server.wait_task(response.uid()).await;
snapshot!(task, @r###" snapshot!(task, @r###"
{ {
"uid": 1, "uid": "[uid]",
"indexUid": "doggo", "indexUid": "doggo",
"status": "failed", "status": "failed",
"type": "settingsUpdate", "type": "settingsUpdate",
@ -1290,7 +1290,7 @@ async fn server_returns_bad_response() {
let task = server.wait_task(response.uid()).await; let task = server.wait_task(response.uid()).await;
snapshot!(task, @r###" snapshot!(task, @r###"
{ {
"uid": 2, "uid": "[uid]",
"indexUid": "doggo", "indexUid": "doggo",
"status": "failed", "status": "failed",
"type": "settingsUpdate", "type": "settingsUpdate",
@ -1345,7 +1345,7 @@ async fn server_returns_bad_response() {
let task = server.wait_task(response.uid()).await; let task = server.wait_task(response.uid()).await;
snapshot!(task, @r###" snapshot!(task, @r###"
{ {
"uid": 3, "uid": "[uid]",
"indexUid": "doggo", "indexUid": "doggo",
"status": "failed", "status": "failed",
"type": "settingsUpdate", "type": "settingsUpdate",
@ -1410,7 +1410,7 @@ async fn server_returns_bad_response() {
let task = server.wait_task(response.uid()).await; let task = server.wait_task(response.uid()).await;
snapshot!(task, @r###" snapshot!(task, @r###"
{ {
"uid": 4, "uid": "[uid]",
"indexUid": "doggo", "indexUid": "doggo",
"status": "failed", "status": "failed",
"type": "settingsUpdate", "type": "settingsUpdate",
@ -1477,7 +1477,7 @@ async fn server_returns_multiple() {
let task = index.wait_task(value.uid()).await; let task = index.wait_task(value.uid()).await;
snapshot!(task, @r###" snapshot!(task, @r###"
{ {
"uid": 1, "uid": "[uid]",
"indexUid": "doggo", "indexUid": "doggo",
"status": "succeeded", "status": "succeeded",
"type": "documentAdditionOrUpdate", "type": "documentAdditionOrUpdate",
@ -1582,7 +1582,7 @@ async fn server_single_input_returns_in_array() {
let task = index.wait_task(value.uid()).await; let task = index.wait_task(value.uid()).await;
snapshot!(task, @r###" snapshot!(task, @r###"
{ {
"uid": 1, "uid": "[uid]",
"indexUid": "doggo", "indexUid": "doggo",
"status": "succeeded", "status": "succeeded",
"type": "documentAdditionOrUpdate", "type": "documentAdditionOrUpdate",
@ -1687,7 +1687,7 @@ async fn server_raw() {
let task = index.wait_task(value.uid()).await; let task = index.wait_task(value.uid()).await;
snapshot!(task, @r###" snapshot!(task, @r###"
{ {
"uid": 1, "uid": "[uid]",
"indexUid": "doggo", "indexUid": "doggo",
"status": "succeeded", "status": "succeeded",
"type": "documentAdditionOrUpdate", "type": "documentAdditionOrUpdate",
@ -1784,7 +1784,7 @@ async fn server_custom_header() {
let task = server.wait_task(response.uid()).await; let task = server.wait_task(response.uid()).await;
snapshot!(task, @r###" snapshot!(task, @r###"
{ {
"uid": 0, "uid": "[uid]",
"indexUid": "doggo", "indexUid": "doggo",
"status": "failed", "status": "failed",
"type": "settingsUpdate", "type": "settingsUpdate",
@ -1823,7 +1823,7 @@ async fn server_custom_header() {
let task = server.wait_task(response.uid()).await; let task = server.wait_task(response.uid()).await;
snapshot!(task, @r###" snapshot!(task, @r###"
{ {
"uid": 1, "uid": "[uid]",
"indexUid": "doggo", "indexUid": "doggo",
"status": "failed", "status": "failed",
"type": "settingsUpdate", "type": "settingsUpdate",
@ -1865,7 +1865,7 @@ async fn server_custom_header() {
let task = server.wait_task(response.uid()).await; let task = server.wait_task(response.uid()).await;
snapshot!(task, @r###" snapshot!(task, @r###"
{ {
"uid": 2, "uid": "[uid]",
"indexUid": "doggo", "indexUid": "doggo",
"status": "succeeded", "status": "succeeded",
"type": "settingsUpdate", "type": "settingsUpdate",

View File

@ -43,7 +43,7 @@ async fn update_embedder() {
let ret = server.wait_task(response.uid()).await; let ret = server.wait_task(response.uid()).await;
snapshot!(ret, @r###" snapshot!(ret, @r###"
{ {
"uid": 1, "uid": "[uid]",
"indexUid": "doggo", "indexUid": "doggo",
"status": "succeeded", "status": "succeeded",
"type": "settingsUpdate", "type": "settingsUpdate",

View File

@ -2,7 +2,7 @@
source: meilisearch/tests/vector/mod.rs source: meilisearch/tests/vector/mod.rs
--- ---
{ {
"uid": 1, "uid": "[uid]",
"indexUid": "doggo", "indexUid": "doggo",
"status": "succeeded", "status": "succeeded",
"type": "documentAdditionOrUpdate", "type": "documentAdditionOrUpdate",

View File

@ -2,7 +2,7 @@
source: meilisearch/tests/vector/mod.rs source: meilisearch/tests/vector/mod.rs
--- ---
{ {
"uid": 2, "uid": "[uid]",
"indexUid": "doggo", "indexUid": "doggo",
"status": "succeeded", "status": "succeeded",
"type": "documentAdditionOrUpdate", "type": "documentAdditionOrUpdate",

View File

@ -2,7 +2,7 @@
source: meilisearch/tests/vector/mod.rs source: meilisearch/tests/vector/mod.rs
--- ---
{ {
"uid": 0, "uid": "[uid]",
"indexUid": "doggo", "indexUid": "doggo",
"status": "succeeded", "status": "succeeded",
"type": "settingsUpdate", "type": "settingsUpdate",