mirror of
https://github.com/meilisearch/MeiliSearch
synced 2024-12-23 13:10:06 +01:00
Update test after fixing bug in index swap
This commit is contained in:
parent
e641d08846
commit
9b43528bbb
@ -684,37 +684,15 @@ async fn test_summarized_index_swap() {
|
|||||||
{ "indexes": ["doggos", "cattos"] }
|
{ "indexes": ["doggos", "cattos"] }
|
||||||
]))
|
]))
|
||||||
.await;
|
.await;
|
||||||
dbg!(v);
|
assert_json_snapshot!(v, @r###"
|
||||||
server.wait_task(0).await;
|
|
||||||
let (task, _) = server.get_task(0).await;
|
|
||||||
assert_json_snapshot!(task,
|
|
||||||
{ ".duration" => "[duration]", ".enqueuedAt" => "[date]", ".startedAt" => "[date]", ".finishedAt" => "[date]" },
|
|
||||||
@r###"
|
|
||||||
{
|
{
|
||||||
"uid": 0,
|
"message": "Indexes `cattos`, `doggos` not found.",
|
||||||
"indexUid": null,
|
"code": "index_not_found",
|
||||||
"status": "failed",
|
"type": "invalid_request",
|
||||||
"type": "indexSwap",
|
"link": "https://docs.meilisearch.com/errors#index_not_found"
|
||||||
"details": {
|
|
||||||
"indexes": [
|
|
||||||
[
|
|
||||||
"doggos",
|
|
||||||
"cattos"
|
|
||||||
]
|
|
||||||
]
|
|
||||||
},
|
|
||||||
"error": {
|
|
||||||
"message": "Index `doggos` not found.",
|
|
||||||
"code": "index_not_found",
|
|
||||||
"type": "invalid_request",
|
|
||||||
"link": "https://docs.meilisearch.com/errors#index_not_found"
|
|
||||||
},
|
|
||||||
"duration": "[duration]",
|
|
||||||
"enqueuedAt": "[date]",
|
|
||||||
"startedAt": "[date]",
|
|
||||||
"finishedAt": "[date]"
|
|
||||||
}
|
}
|
||||||
"###);
|
"###);
|
||||||
|
|
||||||
server.index("doggos").create(None).await;
|
server.index("doggos").create(None).await;
|
||||||
server.index("cattos").create(None).await;
|
server.index("cattos").create(None).await;
|
||||||
server
|
server
|
||||||
@ -722,22 +700,24 @@ async fn test_summarized_index_swap() {
|
|||||||
{ "indexes": ["doggos", "cattos"] }
|
{ "indexes": ["doggos", "cattos"] }
|
||||||
]))
|
]))
|
||||||
.await;
|
.await;
|
||||||
server.wait_task(3).await;
|
server.wait_task(2).await;
|
||||||
let (task, _) = server.get_task(3).await;
|
let (task, _) = server.get_task(2).await;
|
||||||
assert_json_snapshot!(task,
|
assert_json_snapshot!(task,
|
||||||
{ ".duration" => "[duration]", ".enqueuedAt" => "[date]", ".startedAt" => "[date]", ".finishedAt" => "[date]" },
|
{ ".duration" => "[duration]", ".enqueuedAt" => "[date]", ".startedAt" => "[date]", ".finishedAt" => "[date]" },
|
||||||
@r###"
|
@r###"
|
||||||
{
|
{
|
||||||
"uid": 3,
|
"uid": 2,
|
||||||
"indexUid": null,
|
"indexUid": null,
|
||||||
"status": "succeeded",
|
"status": "succeeded",
|
||||||
"type": "indexSwap",
|
"type": "indexSwap",
|
||||||
"details": {
|
"details": {
|
||||||
"indexes": [
|
"swaps": [
|
||||||
[
|
{
|
||||||
"doggos",
|
"indexes": [
|
||||||
"cattos"
|
"doggos",
|
||||||
]
|
"cattos"
|
||||||
|
]
|
||||||
|
}
|
||||||
]
|
]
|
||||||
},
|
},
|
||||||
"duration": "[duration]",
|
"duration": "[duration]",
|
||||||
|
Loading…
x
Reference in New Issue
Block a user