diff options
Diffstat (limited to 'test')
| -rw-r--r-- | test/src/rabbit_tests.erl | 16 |
1 files changed, 16 insertions, 0 deletions
diff --git a/test/src/rabbit_tests.erl b/test/src/rabbit_tests.erl index 95a8c45ffa..4c1489f6aa 100644 --- a/test/src/rabbit_tests.erl +++ b/test/src/rabbit_tests.erl @@ -72,6 +72,7 @@ all_tests0() -> passed = test_policy_validation(), passed = test_policy_opts_validation(), passed = test_ha_policy_validation(), + passed = test_queue_master_location_policy_validation(), passed = test_server_status(), passed = test_amqp_connection_refusal(), passed = test_confirms(), @@ -1155,6 +1156,21 @@ test_ha_policy_validation() -> ok = control_action(clear_policy, ["name"]), passed. +test_queue_master_location_policy_validation() -> + Set = fun (JSON) -> + control_action_opts( ["set_policy", "name", ".*", JSON] ) + end, + OK = fun (JSON) -> ok = Set(JSON) end, + Fail = fun (JSON) -> error = Set(JSON) end, + + OK ("{\"x-queue-master-locator\":\"min-masters\"}"), + OK ("{\"x-queue-master-locator\":\"client-local\"}"), + OK ("{\"x-queue-master-locator\":\"random\"}"), + Fail("{\"x-queue-master-locator\":\"made_up\"}"), + + ok = control_action(clear_policy, ["name"]), + passed. + test_server_status() -> %% create a few things so there is some useful information to list {_Writer, Limiter, Ch} = test_channel(), |
