Update is_quorum_critical_test for #12133

Now the API endpoint can return Khepri as
a "queue" (or "stream") without the necessary
number of replicas online.

So don't expect the list to only have one element.
This commit is contained in:
Michael Klishin 2024-08-24 21:25:29 -04:00
parent f47daee915
commit d7d1397d4b
1 changed files with 5 additions and 2 deletions

View File

@ -198,8 +198,11 @@ is_quorum_critical_test(Config) ->
Body = http_get_failed(Config, "/health/checks/node-is-quorum-critical"),
?assertEqual(<<"failed">>, maps:get(<<"status">>, Body)),
?assertEqual(true, maps:is_key(<<"reason">>, Body)),
[Queue] = maps:get(<<"queues">>, Body),
?assertEqual(QName, maps:get(<<"name">>, Queue)),
Queues = maps:get(<<"queues">>, Body),
?assert(lists:any(
fun(Item) ->
QName =:= maps:get(<<"name">>, Item)
end, Queues)),
passed.