summaryrefslogtreecommitdiff
path: root/test
diff options
context:
space:
mode:
authorkjnilsson <knilsson@pivotal.io>2019-02-20 17:29:29 +0000
committerkjnilsson <knilsson@pivotal.io>2019-02-20 17:29:29 +0000
commit496986d10a27d52718a8b3273e896f98f456d2ad (patch)
tree12274d34960d4941c9d989115e02d52dda6c01dc /test
parent2856a2f921ac5b63a469689881f2da251d472ae2 (diff)
downloadrabbitmq-server-git-496986d10a27d52718a8b3273e896f98f456d2ad.tar.gz
Change rabbit_quorum_queue:grow/3
To filter non-running nodes instead of by connection as it should not be possible to add a quorum queue server running on an erlang node without RabbitMQ. [#162782801]
Diffstat (limited to 'test')
-rw-r--r--test/rabbitmq_queues_cli_integration_SUITE.erl16
1 files changed, 15 insertions, 1 deletions
diff --git a/test/rabbitmq_queues_cli_integration_SUITE.erl b/test/rabbitmq_queues_cli_integration_SUITE.erl
index 71e51d5ab5..1601ba82fe 100644
--- a/test/rabbitmq_queues_cli_integration_SUITE.erl
+++ b/test/rabbitmq_queues_cli_integration_SUITE.erl
@@ -30,7 +30,8 @@ groups() ->
[
{tests, [], [
shrink,
- grow
+ grow,
+ grow_invalid_node_filtered
]}
].
@@ -99,6 +100,19 @@ grow(Config) ->
?assertNotMatch(#{{"/", "grow1"} := _}, parse_result(Out3)),
ok.
+grow_invalid_node_filtered(Config) ->
+ NodeConfig = rabbit_ct_broker_helpers:get_node_config(Config, 2),
+ Nodename2 = ?config(nodename, NodeConfig),
+ Ch = rabbit_ct_client_helpers:open_channel(Config, Nodename2),
+ %% declare a quorum queue
+ QName = "grow-err",
+ Args = [{<<"x-quorum-initial-group-size">>, long, 1}],
+ #'queue.declare_ok'{} = declare_qq(Ch, QName, Args),
+ DummyNode = not_really_a_node@nothing,
+ {ok, Out1} = rabbitmq_queues(Config, 0, ["grow", DummyNode, "all"]),
+ ?assertNotMatch(#{{"/", "grow-err"} := _}, parse_result(Out1)),
+ ok.
+
parse_result(S) ->
Lines = string:split(S, "\n", all),
maps:from_list(