amqp_client_SUITE: Trim "list_connections" output before parsing it
[Why] Sometimes, at least in CI, it looks like the output of the CLI is prepended with a newline, sometimes not. This breaks the check of that output. [How] We just trim the output before parsing it. The parsing already takes care of trimming internal whitespaces.
This commit is contained in:
parent
8307aa6dd2
commit
ffaf919846
|
@ -4087,7 +4087,7 @@ list_connections(Config) ->
|
|||
|
||||
%% CLI should list AMQP 1.0 container-id
|
||||
{ok, StdOut1} = rabbit_ct_broker_helpers:rabbitmqctl(Config, 0, ["list_connections", "--silent", "container_id"]),
|
||||
ContainerIds0 = re:split(StdOut1, <<"\n">>, [trim]),
|
||||
ContainerIds0 = re:split(string:trim(StdOut1), <<"\n">>, [trim]),
|
||||
ContainerIds = lists:sort(ContainerIds0),
|
||||
?assertEqual([<<>>, ContainerId0, ContainerId2],
|
||||
ContainerIds),
|
||||
|
|
Loading…
Reference in New Issue