summaryrefslogtreecommitdiff
path: root/test
diff options
context:
space:
mode:
Diffstat (limited to 'test')
-rw-r--r--test/queue_master_location_SUITE.erl14
1 files changed, 14 insertions, 0 deletions
diff --git a/test/queue_master_location_SUITE.erl b/test/queue_master_location_SUITE.erl
index f8018552d9..4564c4a486 100644
--- a/test/queue_master_location_SUITE.erl
+++ b/test/queue_master_location_SUITE.erl
@@ -51,6 +51,7 @@ groups() ->
{cluster_size_3, [], [
declare_args,
declare_policy,
+ declare_invalid_policy,
declare_policy_nodes,
declare_policy_all,
declare_policy_exactly,
@@ -129,6 +130,19 @@ declare_policy(Config) ->
declare(Config, QueueName, false, false, _Args=[], none),
verify_min_master(Config, Q).
+declare_invalid_policy(Config) ->
+ %% Tests that queue masters location returns 'ok', otherwise the validation of
+ %% any other parameter might be skipped - and policy accepted which will crash
+ %% in application
+ setup_test_environment(Config),
+ unset_location_config(Config),
+ Policy = [{<<"queue-master-locator">>, <<"min-masters">>},
+ {<<"ha-mode">>, <<"exactly">>},
+ {<<"ha-params">>, <<"2">>}],
+ {error_string, _} = rabbit_ct_broker_helpers:rpc(
+ Config, 0, rabbit_policy, set,
+ [<<"/">>, ?POLICY, <<".*">>, Policy, 0, <<"queues">>, <<"acting-user">>]).
+
declare_policy_nodes(Config) ->
setup_test_environment(Config),
unset_location_config(Config),