mirror of
https://github.com/meilisearch/meilisearch.git
synced 2025-09-24 05:36:28 +00:00
fix error code and add a bunch of tests for the swap and index rename
This commit is contained in:
@ -895,7 +895,7 @@ async fn test_summarized_index_swap() {
|
||||
server.wait_task(task.uid()).await.failed();
|
||||
let (task, _) = server.get_task(task.uid()).await;
|
||||
snapshot!(task,
|
||||
@r###"
|
||||
@r#"
|
||||
{
|
||||
"uid": "[uid]",
|
||||
"batchUid": "[batch_uid]",
|
||||
@ -909,7 +909,8 @@ async fn test_summarized_index_swap() {
|
||||
"indexes": [
|
||||
"doggos",
|
||||
"cattos"
|
||||
]
|
||||
],
|
||||
"rename": false
|
||||
}
|
||||
]
|
||||
},
|
||||
@ -924,7 +925,7 @@ async fn test_summarized_index_swap() {
|
||||
"startedAt": "[date]",
|
||||
"finishedAt": "[date]"
|
||||
}
|
||||
"###);
|
||||
"#);
|
||||
|
||||
let doggos_index = server.unique_index();
|
||||
let (task, _code) = doggos_index.create(None).await;
|
||||
@ -941,7 +942,7 @@ async fn test_summarized_index_swap() {
|
||||
let (task, _) = server.get_task(task.uid()).await;
|
||||
snapshot!(json_string!(task,
|
||||
{ ".uid" => "[uid]", ".batchUid" => "[batch_uid]", ".**.indexes[0]" => "doggos", ".**.indexes[1]" => "cattos", ".duration" => "[duration]", ".enqueuedAt" => "[date]", ".startedAt" => "[date]", ".finishedAt" => "[date]" }),
|
||||
@r###"
|
||||
@r#"
|
||||
{
|
||||
"uid": "[uid]",
|
||||
"batchUid": "[batch_uid]",
|
||||
@ -955,7 +956,8 @@ async fn test_summarized_index_swap() {
|
||||
"indexes": [
|
||||
"doggos",
|
||||
"cattos"
|
||||
]
|
||||
],
|
||||
"rename": false
|
||||
}
|
||||
]
|
||||
},
|
||||
@ -965,7 +967,7 @@ async fn test_summarized_index_swap() {
|
||||
"startedAt": "[date]",
|
||||
"finishedAt": "[date]"
|
||||
}
|
||||
"###);
|
||||
"#);
|
||||
}
|
||||
|
||||
#[actix_web::test]
|
||||
|
Reference in New Issue
Block a user