summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorMichael Klishin <mklishin@pivotal.io>2018-10-24 19:35:44 +0300
committerMichael Klishin <mklishin@pivotal.io>2018-10-24 19:36:18 +0300
commit8ed6b4477f41085773934bf18f7acfb9929a5411 (patch)
tree6546bfb2a87f93907174d0b549b2ab6dd30d851d
parent5d28e8ca2207b68e60c17e133e6c9074e4517734 (diff)
downloadrabbitmq-server-git-8ed6b4477f41085773934bf18f7acfb9929a5411.tar.gz
Use --no-table-headers with list_* CLI commands
The suites do not expect (or care for) the header row. Per discussion with @dumbbell @hairyhum. References rabbitmq/rabbitmq-cli#264.
-rw-r--r--test/list_consumers_sanity_check_SUITE.erl10
-rw-r--r--test/list_queues_online_and_offline_SUITE.erl6
-rw-r--r--test/policy_SUITE.erl3
-rw-r--r--test/rabbitmqctl_integration_SUITE.erl4
4 files changed, 12 insertions, 11 deletions
diff --git a/test/list_consumers_sanity_check_SUITE.erl b/test/list_consumers_sanity_check_SUITE.erl
index 8f2fb8e57f..3fa02b1de6 100644
--- a/test/list_consumers_sanity_check_SUITE.erl
+++ b/test/list_consumers_sanity_check_SUITE.erl
@@ -91,7 +91,7 @@ list_consumers_sanity_check(Config) ->
%% `rabbitmqctl report` shares some code with `list_consumers`, so
%% check that it also reports both channels
{ok, ReportStdOut} = rabbit_ct_broker_helpers:rabbitmqctl(Config, A,
- ["list_consumers"]),
+ ["list_consumers", "--no-table-headers"]),
ReportLines = re:split(ReportStdOut, <<"\n">>, [trim]),
ReportCTags = [lists:nth(3, re:split(Row, <<"\t">>)) || <<"list_consumers_q", _/binary>> = Row <- ReportLines],
true = (lists:sort([CTag1, CTag2]) =:=
@@ -99,7 +99,7 @@ list_consumers_sanity_check(Config) ->
rabbitmqctl_list_consumers(Config, Node) ->
{ok, StdOut} = rabbit_ct_broker_helpers:rabbitmqctl(Config, Node,
- ["list_consumers"]),
+ ["list_consumers", "--no-table-headers"]),
[<<"Listing consumers", _/binary>> | ConsumerRows] = re:split(StdOut, <<"\n">>, [trim]),
CTags = [ lists:nth(3, re:split(Row, <<"\t">>)) || Row <- ConsumerRows ],
CTags.
@@ -117,17 +117,17 @@ list_queues_online_and_offline(Config) ->
rabbit_ct_broker_helpers:rabbitmqctl(Config, B, ["stop"]),
GotUp = lists:sort(rabbit_ct_broker_helpers:rabbitmqctl_list(Config, A,
- ["list_queues", "--online", "name"])),
+ ["list_queues", "--online", "name", "--no-table-headers"])),
ExpectUp = [[<<"q_a_1">>], [<<"q_a_2">>]],
ExpectUp = GotUp,
GotDown = lists:sort(rabbit_ct_broker_helpers:rabbitmqctl_list(Config, A,
- ["list_queues", "--offline", "name"])),
+ ["list_queues", "--offline", "name", "--no-table-headers"])),
ExpectDown = [[<<"q_b_1">>], [<<"q_b_2">>]],
ExpectDown = GotDown,
GotAll = lists:sort(rabbit_ct_broker_helpers:rabbitmqctl_list(Config, A,
- ["list_queues", "name"])),
+ ["list_queues", "name", "--no-table-headers"])),
ExpectAll = ExpectUp ++ ExpectDown,
ExpectAll = GotAll,
diff --git a/test/list_queues_online_and_offline_SUITE.erl b/test/list_queues_online_and_offline_SUITE.erl
index 96dc988006..4b56012a26 100644
--- a/test/list_queues_online_and_offline_SUITE.erl
+++ b/test/list_queues_online_and_offline_SUITE.erl
@@ -86,17 +86,17 @@ list_queues_online_and_offline(Config) ->
rabbit_ct_broker_helpers:rabbitmqctl(Config, B, ["stop"]),
GotUp = lists:sort(rabbit_ct_broker_helpers:rabbitmqctl_list(Config, A,
- ["list_queues", "--online", "name"])),
+ ["list_queues", "--online", "name", "--no-table-headers"])),
ExpectUp = [[<<"q_a_1">>], [<<"q_a_2">>]],
ExpectUp = GotUp,
GotDown = lists:sort(rabbit_ct_broker_helpers:rabbitmqctl_list(Config, A,
- ["list_queues", "--offline", "name"])),
+ ["list_queues", "--offline", "name", "--no-table-headers"])),
ExpectDown = [[<<"q_b_1">>], [<<"q_b_2">>]],
ExpectDown = GotDown,
GotAll = lists:sort(rabbit_ct_broker_helpers:rabbitmqctl_list(Config, A,
- ["list_queues", "name"])),
+ ["list_queues", "name", "--no-table-headers"])),
ExpectAll = ExpectUp ++ ExpectDown,
ExpectAll = GotAll,
diff --git a/test/policy_SUITE.erl b/test/policy_SUITE.erl
index 2c41433a30..7cf3427db0 100644
--- a/test/policy_SUITE.erl
+++ b/test/policy_SUITE.erl
@@ -147,7 +147,8 @@ operator_retroactive_policy_publish_ttl(Config) ->
%% the queue
publish(Ch, Q, lists:seq(1, 25)),
timer:sleep(50),
- [[<<"policy_ttl-queue">>, <<"75">>]] = rabbit_ct_broker_helpers:rabbitmqctl_list(Config, 0, ["list_queues"]),
+ [[<<"policy_ttl-queue">>, <<"75">>]] =
+ rabbit_ct_broker_helpers:rabbitmqctl_list(Config, 0, ["list_queues", "--no-table-headers"]),
get_messages(50, Ch, Q),
delete(Ch, Q),
diff --git a/test/rabbitmqctl_integration_SUITE.erl b/test/rabbitmqctl_integration_SUITE.erl
index 71b74ea104..a5d3a0fd03 100644
--- a/test/rabbitmqctl_integration_SUITE.erl
+++ b/test/rabbitmqctl_integration_SUITE.erl
@@ -151,7 +151,7 @@ list_queues_stopped(Config) ->
ListedQueues =
[ {Name, State}
|| [Name, State] <- rabbit_ct_broker_helpers:rabbitmqctl_list(
- Config, 0, ["list_queues", "name", "state"]) ],
+ Config, 0, ["list_queues", "name", "state", "--no-table-headers"]) ],
[ <<"running">> = proplists:get_value(Q, ListedQueues) || Q <- Node1Queues ],
%% Node is running. Vhost is down
@@ -176,4 +176,4 @@ assert_ctl_queues(Config, Node, Args, Expected0) ->
end.
run_list_queues(Config, Node, Args) ->
- rabbit_ct_broker_helpers:rabbitmqctl_list(Config, Node, ["list_queues"] ++ Args ++ ["name"]). \ No newline at end of file
+ rabbit_ct_broker_helpers:rabbitmqctl_list(Config, Node, ["list_queues"] ++ Args ++ ["name", "--no-table-headers"]).