From cb8f033130083d0001d7ae5a57ce7fafda5bcb40 Mon Sep 17 00:00:00 2001 From: Louis Dureuil Date: Mon, 13 Jan 2025 13:31:48 +0100 Subject: [PATCH] Fix tests --- crates/meilisearch/tests/dumps/mod.rs | 13 +++++++++++++ crates/meilisearch/tests/settings/get_settings.rs | 5 +++-- 2 files changed, 16 insertions(+), 2 deletions(-) diff --git a/crates/meilisearch/tests/dumps/mod.rs b/crates/meilisearch/tests/dumps/mod.rs index c0be1ecb1..a2b008fe3 100644 --- a/crates/meilisearch/tests/dumps/mod.rs +++ b/crates/meilisearch/tests/dumps/mod.rs @@ -78,6 +78,7 @@ async fn import_dump_v1_movie_raw() { "pagination": { "maxTotalHits": 1000 }, + "embedders": {}, "searchCutoffMs": null, "localizedAttributes": null, "facetSearch": true, @@ -243,6 +244,7 @@ async fn import_dump_v1_movie_with_settings() { "pagination": { "maxTotalHits": 1000 }, + "embedders": {}, "searchCutoffMs": null, "localizedAttributes": null, "facetSearch": true, @@ -394,6 +396,7 @@ async fn import_dump_v1_rubygems_with_settings() { "pagination": { "maxTotalHits": 1000 }, + "embedders": {}, "searchCutoffMs": null, "localizedAttributes": null, "facetSearch": true, @@ -531,6 +534,7 @@ async fn import_dump_v2_movie_raw() { "pagination": { "maxTotalHits": 1000 }, + "embedders": {}, "searchCutoffMs": null, "localizedAttributes": null, "facetSearch": true, @@ -680,6 +684,7 @@ async fn import_dump_v2_movie_with_settings() { "pagination": { "maxTotalHits": 1000 }, + "embedders": {}, "searchCutoffMs": null, "localizedAttributes": null, "facetSearch": true, @@ -828,6 +833,7 @@ async fn import_dump_v2_rubygems_with_settings() { "pagination": { "maxTotalHits": 1000 }, + "embedders": {}, "searchCutoffMs": null, "localizedAttributes": null, "facetSearch": true, @@ -965,6 +971,7 @@ async fn import_dump_v3_movie_raw() { "pagination": { "maxTotalHits": 1000 }, + "embedders": {}, "searchCutoffMs": null, "localizedAttributes": null, "facetSearch": true, @@ -1114,6 +1121,7 @@ async fn import_dump_v3_movie_with_settings() { "pagination": { "maxTotalHits": 1000 }, + "embedders": {}, "searchCutoffMs": null, "localizedAttributes": null, "facetSearch": true, @@ -1262,6 +1270,7 @@ async fn import_dump_v3_rubygems_with_settings() { "pagination": { "maxTotalHits": 1000 }, + "embedders": {}, "searchCutoffMs": null, "localizedAttributes": null, "facetSearch": true, @@ -1399,6 +1408,7 @@ async fn import_dump_v4_movie_raw() { "pagination": { "maxTotalHits": 1000 }, + "embedders": {}, "searchCutoffMs": null, "localizedAttributes": null, "facetSearch": true, @@ -1548,6 +1558,7 @@ async fn import_dump_v4_movie_with_settings() { "pagination": { "maxTotalHits": 1000 }, + "embedders": {}, "searchCutoffMs": null, "localizedAttributes": null, "facetSearch": true, @@ -1696,6 +1707,7 @@ async fn import_dump_v4_rubygems_with_settings() { "pagination": { "maxTotalHits": 1000 }, + "embedders": {}, "searchCutoffMs": null, "localizedAttributes": null, "facetSearch": true, @@ -1944,6 +1956,7 @@ async fn import_dump_v6_containing_experimental_features() { "pagination": { "maxTotalHits": 1000 }, + "embedders": {}, "searchCutoffMs": null, "localizedAttributes": null, "facetSearch": true, diff --git a/crates/meilisearch/tests/settings/get_settings.rs b/crates/meilisearch/tests/settings/get_settings.rs index 5ac7f3119..2a7d713f2 100644 --- a/crates/meilisearch/tests/settings/get_settings.rs +++ b/crates/meilisearch/tests/settings/get_settings.rs @@ -152,7 +152,7 @@ test_setting_routes!( { setting: embedders, update_verb: patch, - default_value: null + default_value: {} }, { setting: facet_search, @@ -197,7 +197,7 @@ async fn get_settings() { let (response, code) = index.settings().await; assert_eq!(code, 200); let settings = response.as_object().unwrap(); - assert_eq!(settings.keys().len(), 19); + assert_eq!(settings.keys().len(), 20); assert_eq!(settings["displayedAttributes"], json!(["*"])); assert_eq!(settings["searchableAttributes"], json!(["*"])); assert_eq!(settings["filterableAttributes"], json!([])); @@ -230,6 +230,7 @@ async fn get_settings() { assert_eq!(settings["searchCutoffMs"], json!(null)); assert_eq!(settings["prefixSearch"], json!("indexingTime")); assert_eq!(settings["facetSearch"], json!(true)); + assert_eq!(settings["embedders"], json!({})); } #[actix_rt::test]