From 9c60298944c1bb96ba26ad1a27aa7d2030b13036 Mon Sep 17 00:00:00 2001 From: Simon MacMullen Date: Wed, 29 Sep 2010 11:53:50 +0100 Subject: [PATCH] Make it clearer that we export server-named queues. --- deps/rabbitmq_management/TODO | 2 +- .../src/rabbit_mgmt_wm_all_configuration.erl | 2 +- .../test/rabbit_mgmt_test_http.erl | 20 ++++++++++++++++--- 3 files changed, 19 insertions(+), 5 deletions(-) diff --git a/deps/rabbitmq_management/TODO b/deps/rabbitmq_management/TODO index 952a16a2c9..5625588a15 100644 --- a/deps/rabbitmq_management/TODO +++ b/deps/rabbitmq_management/TODO @@ -1,6 +1,5 @@ Before first "proper" release ============================= -Backup / restore entire state (except messages). Write more management: Purge queues Do sensible things with vhosts in UI. @@ -41,6 +40,7 @@ Clustering management: Make user editing rather clearer Allow empty fields in PUT. Activity log (to see things that flick in and out of existence quickly). +Aggregate connection / channel info over hosts. Less urgent =========== diff --git a/deps/rabbitmq_management/src/rabbit_mgmt_wm_all_configuration.erl b/deps/rabbitmq_management/src/rabbit_mgmt_wm_all_configuration.erl index f3ecb0a1e6..4eb43f512b 100644 --- a/deps/rabbitmq_management/src/rabbit_mgmt_wm_all_configuration.erl +++ b/deps/rabbitmq_management/src/rabbit_mgmt_wm_all_configuration.erl @@ -131,7 +131,7 @@ get_part(Name, Parts) -> end. export_queue(#amqqueue{ name = QName, exclusive_owner = none }) -> - export_name(QName); + true; export_queue(_) -> false. diff --git a/deps/rabbitmq_management/test/rabbit_mgmt_test_http.erl b/deps/rabbitmq_management/test/rabbit_mgmt_test_http.erl index 17d60eccde..ec0f657c09 100644 --- a/deps/rabbitmq_management/test/rabbit_mgmt_test_http.erl +++ b/deps/rabbitmq_management/test/rabbit_mgmt_test_http.erl @@ -495,6 +495,23 @@ all_configuration_remove_things_test() -> amqp_connection:close(Conn), ok. +all_configuration_server_named_queue_test() -> + {ok, Conn} = amqp_connection:start(network, #amqp_params{}), + {ok, Ch} = amqp_connection:open_channel(Conn), + #'queue.declare_ok'{ queue = QName } = + amqp_channel:call(Ch, #'queue.declare'{}), + amqp_channel:close(Ch), + amqp_connection:close(Conn), + Path = "/queues/%2f/" ++ mochiweb_util:quote_plus(QName), + http_get(Path, ?OK), + AllConfig = http_get("/all-configuration", ?OK), + http_delete(Path, ?NO_CONTENT), + http_get(Path, ?NOT_FOUND), + http_post("/all-configuration", AllConfig, ?NO_CONTENT), + http_get(Path, ?OK), + http_delete(Path, ?NO_CONTENT), + ok. + aliveness_test() -> [{status, <<"ok">>}] = http_get("/aliveness-test/%2f", ?OK), http_get("/aliveness-test/foo", ?NOT_FOUND). @@ -624,6 +641,3 @@ test_item0(Exp, Act) -> pget(K, L) -> proplists:get_value(K, L). - -equals(F1, F2) -> - true = (abs(F1 - F2) < 0.001).