Update the index swap tests after git rebase

This commit is contained in:
Loïc Lecrenier 2023-01-18 09:40:41 +01:00
parent b6ec1f1c6d
commit 82bdb54537
2 changed files with 5 additions and 5 deletions

View File

@ -11,7 +11,7 @@ async fn swap_indexes_bad_format() {
snapshot!(code, @"400 Bad Request"); snapshot!(code, @"400 Bad Request");
snapshot!(json_string!(response), @r###" snapshot!(json_string!(response), @r###"
{ {
"message": "invalid type: String `\"doggo\"`, expected a Sequence at ``.", "message": "Invalid value type: expected an array, but found a string: `\"doggo\"`",
"code": "bad_request", "code": "bad_request",
"type": "invalid_request", "type": "invalid_request",
"link": "https://docs.meilisearch.com/errors#bad-request" "link": "https://docs.meilisearch.com/errors#bad-request"
@ -21,7 +21,7 @@ async fn swap_indexes_bad_format() {
snapshot!(code, @"400 Bad Request"); snapshot!(code, @"400 Bad Request");
snapshot!(json_string!(response), @r###" snapshot!(json_string!(response), @r###"
{ {
"message": "invalid type: String `\"doggo\"`, expected a Map at `[0]`.", "message": "Invalid value type at `[0]`: expected an object, but found a string: `\"doggo\"`",
"code": "bad_request", "code": "bad_request",
"type": "invalid_request", "type": "invalid_request",
"link": "https://docs.meilisearch.com/errors#bad-request" "link": "https://docs.meilisearch.com/errors#bad-request"
@ -37,7 +37,7 @@ async fn swap_indexes_bad_indexes() {
snapshot!(code, @"400 Bad Request"); snapshot!(code, @"400 Bad Request");
snapshot!(json_string!(response), @r###" snapshot!(json_string!(response), @r###"
{ {
"message": "invalid type: String `\"doggo\"`, expected a Sequence at `[0].indexes`.", "message": "Invalid value type at `[0].indexes`: expected an array, but found a string: `\"doggo\"`",
"code": "invalid_swap_indexes", "code": "invalid_swap_indexes",
"type": "invalid_request", "type": "invalid_request",
"link": "https://docs.meilisearch.com/errors#invalid-swap-indexes" "link": "https://docs.meilisearch.com/errors#invalid-swap-indexes"
@ -47,7 +47,7 @@ async fn swap_indexes_bad_indexes() {
snapshot!(code, @"400 Bad Request"); snapshot!(code, @"400 Bad Request");
snapshot!(json_string!(response), @r###" snapshot!(json_string!(response), @r###"
{ {
"message": "Two indexes must be given for each swap. The list `[\"doggo\"]` contains 1 indexes.", "message": "Two indexes must be given for each swap. The list `[IndexUid(\"doggo\")]` contains 1 indexes.",
"code": "invalid_swap_indexes", "code": "invalid_swap_indexes",
"type": "invalid_request", "type": "invalid_request",
"link": "https://docs.meilisearch.com/errors#invalid-swap-indexes" "link": "https://docs.meilisearch.com/errors#invalid-swap-indexes"

View File

@ -155,7 +155,7 @@ async fn swap_indexes() {
server.wait_task(4).await; server.wait_task(4).await;
// ensure the index creation worked properly // ensure the index creation worked properly
let (tasks, code) = server.tasks_filter(json!({ "limit": 2 })).await; let (tasks, code) = server.tasks_filter("limit=2").await;
snapshot!(code, @"200 OK"); snapshot!(code, @"200 OK");
snapshot!(json_string!(tasks, { ".results[].duration" => "[duration]", ".results[].enqueuedAt" => "[date]", ".results[].startedAt" => "[date]", ".results[].finishedAt" => "[date]" }), @r###" snapshot!(json_string!(tasks, { ".results[].duration" => "[duration]", ".results[].enqueuedAt" => "[date]", ".results[].startedAt" => "[date]", ".results[].finishedAt" => "[date]" }), @r###"
{ {