diff options
| author | Jean-Sébastien Pédron <jean-sebastien@rabbitmq.com> | 2019-02-07 16:39:58 +0100 |
|---|---|---|
| committer | Jean-Sébastien Pédron <jean-sebastien@rabbitmq.com> | 2019-02-07 16:40:28 +0100 |
| commit | e43dd17efb135c6f54b8450e40c61d4ed61008c7 (patch) | |
| tree | 8e957811caf4a7c9a5335516a28afd2b2d365cfc /test | |
| parent | e54a003bdc6d139b4c13636ea37854a4746b62f8 (diff) | |
| download | rabbitmq-server-git-e43dd17efb135c6f54b8450e40c61d4ed61008c7.tar.gz | |
rabbitmqctl_integration_SUITE: Use `?assertMatch()`
... instead of re-inventing the pattern.
Diffstat (limited to 'test')
| -rw-r--r-- | test/rabbitmqctl_integration_SUITE.erl | 10 |
1 files changed, 2 insertions, 8 deletions
diff --git a/test/rabbitmqctl_integration_SUITE.erl b/test/rabbitmqctl_integration_SUITE.erl index 87d076f694..3e0c474f2e 100644 --- a/test/rabbitmqctl_integration_SUITE.erl +++ b/test/rabbitmqctl_integration_SUITE.erl @@ -17,6 +17,7 @@ -include_lib("common_test/include/ct.hrl"). -include_lib("amqp_client/include/amqp_client.hrl"). +-include_lib("eunit/include/eunit.hrl"). -export([all/0 ,groups/0 @@ -166,14 +167,7 @@ assert_ctl_queues(Config, Node, Args, Expected0) -> Expected = lists:sort(Expected0), Got0 = run_list_queues(Config, Node, Args), Got = lists:sort(lists:map(fun hd/1, Got0)), - case Got of - Expected -> - ok; - _ -> - ct:pal(error, "Listing queues on node ~p failed. Expected:~n~p~n~nGot:~n~p~n~n", - [Node, Expected, Got]), - exit({list_queues_unexpected_on, Node, Expected, Got}) - end. + ?assertMatch(Expected, Got). run_list_queues(Config, Node, Args) -> rabbit_ct_broker_helpers:rabbitmqctl_list(Config, Node, ["list_queues"] ++ Args ++ ["name", "--no-table-headers"]). |
