rabbitmq-server/deps/rabbitmq_management/test/rabbit_mgmt_test_unit_SUITE...

Ignoring revisions in .git-blame-ignore-revs. Click here to bypass and see the normal blame view.

108 lines
3.3 KiB
Erlang
Raw Permalink Normal View History

%% This Source Code Form is subject to the terms of the Mozilla Public
%% License, v. 2.0. If a copy of the MPL was not distributed with this
%% file, You can obtain one at https://mozilla.org/MPL/2.0/.
%%
2024-01-02 11:02:20 +08:00
%% Copyright (c) 2007-2025 Broadcom. All Rights Reserved. The term “Broadcom” refers to Broadcom Inc. and/or its subsidiaries. All rights reserved.
%%
2011-08-01 17:41:44 +08:00
Switch test suite to Common Test, fixes #233 Squashed commit of the following: commit b104a7f84474e247dfef27cd389d6fac554ab634 Author: Michael Klishin <michael@clojurewerkz.org> Date: Thu Jun 23 18:14:28 2016 +0300 Finish migration to CT Note: this intentionally deletes several tests that depend on ETS table state and clash with "real" stats GC processes running in parallel. Some of them are covered in other test suites, e.g. rabbit-hole, others can only really be tested with a separate simulation test suite. Per discussion with the team. commit 7585883e0f9432fd3360d18d340bcf599ad8d51f Author: Michael Klishin <michael@clojurewerkz.org> Date: Thu Jun 23 15:50:53 2016 +0300 Down to 3 failing tests commit 3243f0efed7033229803404a431c1c6404c25677 Author: Michael Klishin <michael@clojurewerkz.org> Date: Tue Jun 21 01:02:42 2016 +0300 Attempts to simplify a few tests for CT commit 997c2b3782b4ce38708658dc90883980a267a461 Merge: 122c7b7 0ce4f6b Author: Michael Klishin <michael@clojurewerkz.org> Date: Fri Jun 17 14:45:06 2016 +0300 Merge branch 'stable' into common_test commit 122c7b7116778e9aff244822933eaf95567dc59d Author: Michael Klishin <michael@clojurewerkz.org> Date: Thu Jun 16 18:19:28 2016 +0300 Begin porting test_db_SUITE commit 872f3e82966999cebd8ba966daac9410badaca09 Author: Michael Klishin <michael@clojurewerkz.org> Date: Thu Jun 16 13:54:34 2016 +0300 Makes clustering_SUITE pass commit c8d6c89bda6e7571877221ed6b2513e53b1ebc46 Author: Michael Klishin <michael@clojurewerkz.org> Date: Thu Jun 16 03:48:54 2016 +0300 Towards clustering_SUITE commit 7fcb6c834039d6cdf15371ce8640f6dfd9bdf939 Author: Michael Klishin <michael@clojurewerkz.org> Date: Thu Jun 16 02:59:24 2016 +0300 Initial clustering_SUITE test passes commit 11205579e86bad4563e027d025b94f0e57ee8386 Author: Michael Klishin <michael@clojurewerkz.org> Date: Thu Jun 16 02:59:12 2016 +0300 Add mochiweb to test dependencies commit 895ff82e6e6567336c2ac56532f82427a2c4f705 Author: Michael Klishin <michael@clojurewerkz.org> Date: Thu Jun 16 01:09:46 2016 +0300 Refactor commit 6d9200cc8516ee5ea0676fbb0e9b3c88fb2a40a7 Author: Michael Klishin <michael@clojurewerkz.org> Date: Thu Jun 16 00:55:08 2016 +0300 open_unmanaged_connection/1 is now available in rabbit_ct_client_helpers commit 40d03cd2fa2a6bc1d4c7c4a1eeb332c5182e1317 Author: Michael Klishin <michael@clojurewerkz.org> Date: Wed Jun 15 23:51:31 2016 +0300 All http_SUITE tests now pass commit 81e08ef36a08884c02fabd51662018751035b5b6 Author: Michael Klishin <michael@clojurewerkz.org> Date: Wed Jun 15 17:12:27 2016 +0300 More tests pass with Common Test commit aaea771db14624df0db944b4c4d0eb42191fb961 Author: Michael Klishin <michael@clojurewerkz.org> Date: Tue Jun 14 17:41:09 2016 +0300 Continue adapting to Common Test commit 0a57f3256a828a835ce44ef02b2e93a3cfe34ccf Author: Michael Klishin <michael@clojurewerkz.org> Date: Tue Jun 14 15:28:19 2016 +0300 Begin moving test suite to Common Test
2016-06-24 18:27:05 +08:00
-module(rabbit_mgmt_test_unit_SUITE).
-include_lib("eunit/include/eunit.hrl").
Switch test suite to Common Test, fixes #233 Squashed commit of the following: commit b104a7f84474e247dfef27cd389d6fac554ab634 Author: Michael Klishin <michael@clojurewerkz.org> Date: Thu Jun 23 18:14:28 2016 +0300 Finish migration to CT Note: this intentionally deletes several tests that depend on ETS table state and clash with "real" stats GC processes running in parallel. Some of them are covered in other test suites, e.g. rabbit-hole, others can only really be tested with a separate simulation test suite. Per discussion with the team. commit 7585883e0f9432fd3360d18d340bcf599ad8d51f Author: Michael Klishin <michael@clojurewerkz.org> Date: Thu Jun 23 15:50:53 2016 +0300 Down to 3 failing tests commit 3243f0efed7033229803404a431c1c6404c25677 Author: Michael Klishin <michael@clojurewerkz.org> Date: Tue Jun 21 01:02:42 2016 +0300 Attempts to simplify a few tests for CT commit 997c2b3782b4ce38708658dc90883980a267a461 Merge: 122c7b7 0ce4f6b Author: Michael Klishin <michael@clojurewerkz.org> Date: Fri Jun 17 14:45:06 2016 +0300 Merge branch 'stable' into common_test commit 122c7b7116778e9aff244822933eaf95567dc59d Author: Michael Klishin <michael@clojurewerkz.org> Date: Thu Jun 16 18:19:28 2016 +0300 Begin porting test_db_SUITE commit 872f3e82966999cebd8ba966daac9410badaca09 Author: Michael Klishin <michael@clojurewerkz.org> Date: Thu Jun 16 13:54:34 2016 +0300 Makes clustering_SUITE pass commit c8d6c89bda6e7571877221ed6b2513e53b1ebc46 Author: Michael Klishin <michael@clojurewerkz.org> Date: Thu Jun 16 03:48:54 2016 +0300 Towards clustering_SUITE commit 7fcb6c834039d6cdf15371ce8640f6dfd9bdf939 Author: Michael Klishin <michael@clojurewerkz.org> Date: Thu Jun 16 02:59:24 2016 +0300 Initial clustering_SUITE test passes commit 11205579e86bad4563e027d025b94f0e57ee8386 Author: Michael Klishin <michael@clojurewerkz.org> Date: Thu Jun 16 02:59:12 2016 +0300 Add mochiweb to test dependencies commit 895ff82e6e6567336c2ac56532f82427a2c4f705 Author: Michael Klishin <michael@clojurewerkz.org> Date: Thu Jun 16 01:09:46 2016 +0300 Refactor commit 6d9200cc8516ee5ea0676fbb0e9b3c88fb2a40a7 Author: Michael Klishin <michael@clojurewerkz.org> Date: Thu Jun 16 00:55:08 2016 +0300 open_unmanaged_connection/1 is now available in rabbit_ct_client_helpers commit 40d03cd2fa2a6bc1d4c7c4a1eeb332c5182e1317 Author: Michael Klishin <michael@clojurewerkz.org> Date: Wed Jun 15 23:51:31 2016 +0300 All http_SUITE tests now pass commit 81e08ef36a08884c02fabd51662018751035b5b6 Author: Michael Klishin <michael@clojurewerkz.org> Date: Wed Jun 15 17:12:27 2016 +0300 More tests pass with Common Test commit aaea771db14624df0db944b4c4d0eb42191fb961 Author: Michael Klishin <michael@clojurewerkz.org> Date: Tue Jun 14 17:41:09 2016 +0300 Continue adapting to Common Test commit 0a57f3256a828a835ce44ef02b2e93a3cfe34ccf Author: Michael Klishin <michael@clojurewerkz.org> Date: Tue Jun 14 15:28:19 2016 +0300 Begin moving test suite to Common Test
2016-06-24 18:27:05 +08:00
-compile(export_all).
all() ->
[
{group, parallel_tests}
].
groups() ->
[
{parallel_tests, [parallel], [
tokenise_test,
pack_binding_test,
default_restrictions,
path_prefix_test
Switch test suite to Common Test, fixes #233 Squashed commit of the following: commit b104a7f84474e247dfef27cd389d6fac554ab634 Author: Michael Klishin <michael@clojurewerkz.org> Date: Thu Jun 23 18:14:28 2016 +0300 Finish migration to CT Note: this intentionally deletes several tests that depend on ETS table state and clash with "real" stats GC processes running in parallel. Some of them are covered in other test suites, e.g. rabbit-hole, others can only really be tested with a separate simulation test suite. Per discussion with the team. commit 7585883e0f9432fd3360d18d340bcf599ad8d51f Author: Michael Klishin <michael@clojurewerkz.org> Date: Thu Jun 23 15:50:53 2016 +0300 Down to 3 failing tests commit 3243f0efed7033229803404a431c1c6404c25677 Author: Michael Klishin <michael@clojurewerkz.org> Date: Tue Jun 21 01:02:42 2016 +0300 Attempts to simplify a few tests for CT commit 997c2b3782b4ce38708658dc90883980a267a461 Merge: 122c7b7 0ce4f6b Author: Michael Klishin <michael@clojurewerkz.org> Date: Fri Jun 17 14:45:06 2016 +0300 Merge branch 'stable' into common_test commit 122c7b7116778e9aff244822933eaf95567dc59d Author: Michael Klishin <michael@clojurewerkz.org> Date: Thu Jun 16 18:19:28 2016 +0300 Begin porting test_db_SUITE commit 872f3e82966999cebd8ba966daac9410badaca09 Author: Michael Klishin <michael@clojurewerkz.org> Date: Thu Jun 16 13:54:34 2016 +0300 Makes clustering_SUITE pass commit c8d6c89bda6e7571877221ed6b2513e53b1ebc46 Author: Michael Klishin <michael@clojurewerkz.org> Date: Thu Jun 16 03:48:54 2016 +0300 Towards clustering_SUITE commit 7fcb6c834039d6cdf15371ce8640f6dfd9bdf939 Author: Michael Klishin <michael@clojurewerkz.org> Date: Thu Jun 16 02:59:24 2016 +0300 Initial clustering_SUITE test passes commit 11205579e86bad4563e027d025b94f0e57ee8386 Author: Michael Klishin <michael@clojurewerkz.org> Date: Thu Jun 16 02:59:12 2016 +0300 Add mochiweb to test dependencies commit 895ff82e6e6567336c2ac56532f82427a2c4f705 Author: Michael Klishin <michael@clojurewerkz.org> Date: Thu Jun 16 01:09:46 2016 +0300 Refactor commit 6d9200cc8516ee5ea0676fbb0e9b3c88fb2a40a7 Author: Michael Klishin <michael@clojurewerkz.org> Date: Thu Jun 16 00:55:08 2016 +0300 open_unmanaged_connection/1 is now available in rabbit_ct_client_helpers commit 40d03cd2fa2a6bc1d4c7c4a1eeb332c5182e1317 Author: Michael Klishin <michael@clojurewerkz.org> Date: Wed Jun 15 23:51:31 2016 +0300 All http_SUITE tests now pass commit 81e08ef36a08884c02fabd51662018751035b5b6 Author: Michael Klishin <michael@clojurewerkz.org> Date: Wed Jun 15 17:12:27 2016 +0300 More tests pass with Common Test commit aaea771db14624df0db944b4c4d0eb42191fb961 Author: Michael Klishin <michael@clojurewerkz.org> Date: Tue Jun 14 17:41:09 2016 +0300 Continue adapting to Common Test commit 0a57f3256a828a835ce44ef02b2e93a3cfe34ccf Author: Michael Klishin <michael@clojurewerkz.org> Date: Tue Jun 14 15:28:19 2016 +0300 Begin moving test suite to Common Test
2016-06-24 18:27:05 +08:00
]}
].
%% -------------------------------------------------------------------
%% Setup/teardown.
Switch test suite to Common Test, fixes #233 Squashed commit of the following: commit b104a7f84474e247dfef27cd389d6fac554ab634 Author: Michael Klishin <michael@clojurewerkz.org> Date: Thu Jun 23 18:14:28 2016 +0300 Finish migration to CT Note: this intentionally deletes several tests that depend on ETS table state and clash with "real" stats GC processes running in parallel. Some of them are covered in other test suites, e.g. rabbit-hole, others can only really be tested with a separate simulation test suite. Per discussion with the team. commit 7585883e0f9432fd3360d18d340bcf599ad8d51f Author: Michael Klishin <michael@clojurewerkz.org> Date: Thu Jun 23 15:50:53 2016 +0300 Down to 3 failing tests commit 3243f0efed7033229803404a431c1c6404c25677 Author: Michael Klishin <michael@clojurewerkz.org> Date: Tue Jun 21 01:02:42 2016 +0300 Attempts to simplify a few tests for CT commit 997c2b3782b4ce38708658dc90883980a267a461 Merge: 122c7b7 0ce4f6b Author: Michael Klishin <michael@clojurewerkz.org> Date: Fri Jun 17 14:45:06 2016 +0300 Merge branch 'stable' into common_test commit 122c7b7116778e9aff244822933eaf95567dc59d Author: Michael Klishin <michael@clojurewerkz.org> Date: Thu Jun 16 18:19:28 2016 +0300 Begin porting test_db_SUITE commit 872f3e82966999cebd8ba966daac9410badaca09 Author: Michael Klishin <michael@clojurewerkz.org> Date: Thu Jun 16 13:54:34 2016 +0300 Makes clustering_SUITE pass commit c8d6c89bda6e7571877221ed6b2513e53b1ebc46 Author: Michael Klishin <michael@clojurewerkz.org> Date: Thu Jun 16 03:48:54 2016 +0300 Towards clustering_SUITE commit 7fcb6c834039d6cdf15371ce8640f6dfd9bdf939 Author: Michael Klishin <michael@clojurewerkz.org> Date: Thu Jun 16 02:59:24 2016 +0300 Initial clustering_SUITE test passes commit 11205579e86bad4563e027d025b94f0e57ee8386 Author: Michael Klishin <michael@clojurewerkz.org> Date: Thu Jun 16 02:59:12 2016 +0300 Add mochiweb to test dependencies commit 895ff82e6e6567336c2ac56532f82427a2c4f705 Author: Michael Klishin <michael@clojurewerkz.org> Date: Thu Jun 16 01:09:46 2016 +0300 Refactor commit 6d9200cc8516ee5ea0676fbb0e9b3c88fb2a40a7 Author: Michael Klishin <michael@clojurewerkz.org> Date: Thu Jun 16 00:55:08 2016 +0300 open_unmanaged_connection/1 is now available in rabbit_ct_client_helpers commit 40d03cd2fa2a6bc1d4c7c4a1eeb332c5182e1317 Author: Michael Klishin <michael@clojurewerkz.org> Date: Wed Jun 15 23:51:31 2016 +0300 All http_SUITE tests now pass commit 81e08ef36a08884c02fabd51662018751035b5b6 Author: Michael Klishin <michael@clojurewerkz.org> Date: Wed Jun 15 17:12:27 2016 +0300 More tests pass with Common Test commit aaea771db14624df0db944b4c4d0eb42191fb961 Author: Michael Klishin <michael@clojurewerkz.org> Date: Tue Jun 14 17:41:09 2016 +0300 Continue adapting to Common Test commit 0a57f3256a828a835ce44ef02b2e93a3cfe34ccf Author: Michael Klishin <michael@clojurewerkz.org> Date: Tue Jun 14 15:28:19 2016 +0300 Begin moving test suite to Common Test
2016-06-24 18:27:05 +08:00
%% -------------------------------------------------------------------
init_per_group(_, Config) ->
Config.
end_per_group(_, Config) ->
Config.
2024-01-03 16:28:36 +08:00
init_per_testcase(_, Config) ->
case application:get_all_env(rabbitmq_management) of
{error, _} = Error -> Error;
Env ->
lists:foreach(fun({Key,_Value})->
application:unset_env(rabbitmq_management, Key) end, Env),
case application:get_all_env(rabbitmq_auth_backend_oauth2) of
{error, _} = Error -> Error;
Env2 -> lists:foreach(fun({Key,_Value})->
application:unset_env(rabbitmq_auth_backend_oauth2, Key) end, Env2)
end
end,
Config.
Switch test suite to Common Test, fixes #233 Squashed commit of the following: commit b104a7f84474e247dfef27cd389d6fac554ab634 Author: Michael Klishin <michael@clojurewerkz.org> Date: Thu Jun 23 18:14:28 2016 +0300 Finish migration to CT Note: this intentionally deletes several tests that depend on ETS table state and clash with "real" stats GC processes running in parallel. Some of them are covered in other test suites, e.g. rabbit-hole, others can only really be tested with a separate simulation test suite. Per discussion with the team. commit 7585883e0f9432fd3360d18d340bcf599ad8d51f Author: Michael Klishin <michael@clojurewerkz.org> Date: Thu Jun 23 15:50:53 2016 +0300 Down to 3 failing tests commit 3243f0efed7033229803404a431c1c6404c25677 Author: Michael Klishin <michael@clojurewerkz.org> Date: Tue Jun 21 01:02:42 2016 +0300 Attempts to simplify a few tests for CT commit 997c2b3782b4ce38708658dc90883980a267a461 Merge: 122c7b7 0ce4f6b Author: Michael Klishin <michael@clojurewerkz.org> Date: Fri Jun 17 14:45:06 2016 +0300 Merge branch 'stable' into common_test commit 122c7b7116778e9aff244822933eaf95567dc59d Author: Michael Klishin <michael@clojurewerkz.org> Date: Thu Jun 16 18:19:28 2016 +0300 Begin porting test_db_SUITE commit 872f3e82966999cebd8ba966daac9410badaca09 Author: Michael Klishin <michael@clojurewerkz.org> Date: Thu Jun 16 13:54:34 2016 +0300 Makes clustering_SUITE pass commit c8d6c89bda6e7571877221ed6b2513e53b1ebc46 Author: Michael Klishin <michael@clojurewerkz.org> Date: Thu Jun 16 03:48:54 2016 +0300 Towards clustering_SUITE commit 7fcb6c834039d6cdf15371ce8640f6dfd9bdf939 Author: Michael Klishin <michael@clojurewerkz.org> Date: Thu Jun 16 02:59:24 2016 +0300 Initial clustering_SUITE test passes commit 11205579e86bad4563e027d025b94f0e57ee8386 Author: Michael Klishin <michael@clojurewerkz.org> Date: Thu Jun 16 02:59:12 2016 +0300 Add mochiweb to test dependencies commit 895ff82e6e6567336c2ac56532f82427a2c4f705 Author: Michael Klishin <michael@clojurewerkz.org> Date: Thu Jun 16 01:09:46 2016 +0300 Refactor commit 6d9200cc8516ee5ea0676fbb0e9b3c88fb2a40a7 Author: Michael Klishin <michael@clojurewerkz.org> Date: Thu Jun 16 00:55:08 2016 +0300 open_unmanaged_connection/1 is now available in rabbit_ct_client_helpers commit 40d03cd2fa2a6bc1d4c7c4a1eeb332c5182e1317 Author: Michael Klishin <michael@clojurewerkz.org> Date: Wed Jun 15 23:51:31 2016 +0300 All http_SUITE tests now pass commit 81e08ef36a08884c02fabd51662018751035b5b6 Author: Michael Klishin <michael@clojurewerkz.org> Date: Wed Jun 15 17:12:27 2016 +0300 More tests pass with Common Test commit aaea771db14624df0db944b4c4d0eb42191fb961 Author: Michael Klishin <michael@clojurewerkz.org> Date: Tue Jun 14 17:41:09 2016 +0300 Continue adapting to Common Test commit 0a57f3256a828a835ce44ef02b2e93a3cfe34ccf Author: Michael Klishin <michael@clojurewerkz.org> Date: Tue Jun 14 15:28:19 2016 +0300 Begin moving test suite to Common Test
2016-06-24 18:27:05 +08:00
%% -------------------------------------------------------------------
%% Test cases.
Switch test suite to Common Test, fixes #233 Squashed commit of the following: commit b104a7f84474e247dfef27cd389d6fac554ab634 Author: Michael Klishin <michael@clojurewerkz.org> Date: Thu Jun 23 18:14:28 2016 +0300 Finish migration to CT Note: this intentionally deletes several tests that depend on ETS table state and clash with "real" stats GC processes running in parallel. Some of them are covered in other test suites, e.g. rabbit-hole, others can only really be tested with a separate simulation test suite. Per discussion with the team. commit 7585883e0f9432fd3360d18d340bcf599ad8d51f Author: Michael Klishin <michael@clojurewerkz.org> Date: Thu Jun 23 15:50:53 2016 +0300 Down to 3 failing tests commit 3243f0efed7033229803404a431c1c6404c25677 Author: Michael Klishin <michael@clojurewerkz.org> Date: Tue Jun 21 01:02:42 2016 +0300 Attempts to simplify a few tests for CT commit 997c2b3782b4ce38708658dc90883980a267a461 Merge: 122c7b7 0ce4f6b Author: Michael Klishin <michael@clojurewerkz.org> Date: Fri Jun 17 14:45:06 2016 +0300 Merge branch 'stable' into common_test commit 122c7b7116778e9aff244822933eaf95567dc59d Author: Michael Klishin <michael@clojurewerkz.org> Date: Thu Jun 16 18:19:28 2016 +0300 Begin porting test_db_SUITE commit 872f3e82966999cebd8ba966daac9410badaca09 Author: Michael Klishin <michael@clojurewerkz.org> Date: Thu Jun 16 13:54:34 2016 +0300 Makes clustering_SUITE pass commit c8d6c89bda6e7571877221ed6b2513e53b1ebc46 Author: Michael Klishin <michael@clojurewerkz.org> Date: Thu Jun 16 03:48:54 2016 +0300 Towards clustering_SUITE commit 7fcb6c834039d6cdf15371ce8640f6dfd9bdf939 Author: Michael Klishin <michael@clojurewerkz.org> Date: Thu Jun 16 02:59:24 2016 +0300 Initial clustering_SUITE test passes commit 11205579e86bad4563e027d025b94f0e57ee8386 Author: Michael Klishin <michael@clojurewerkz.org> Date: Thu Jun 16 02:59:12 2016 +0300 Add mochiweb to test dependencies commit 895ff82e6e6567336c2ac56532f82427a2c4f705 Author: Michael Klishin <michael@clojurewerkz.org> Date: Thu Jun 16 01:09:46 2016 +0300 Refactor commit 6d9200cc8516ee5ea0676fbb0e9b3c88fb2a40a7 Author: Michael Klishin <michael@clojurewerkz.org> Date: Thu Jun 16 00:55:08 2016 +0300 open_unmanaged_connection/1 is now available in rabbit_ct_client_helpers commit 40d03cd2fa2a6bc1d4c7c4a1eeb332c5182e1317 Author: Michael Klishin <michael@clojurewerkz.org> Date: Wed Jun 15 23:51:31 2016 +0300 All http_SUITE tests now pass commit 81e08ef36a08884c02fabd51662018751035b5b6 Author: Michael Klishin <michael@clojurewerkz.org> Date: Wed Jun 15 17:12:27 2016 +0300 More tests pass with Common Test commit aaea771db14624df0db944b4c4d0eb42191fb961 Author: Michael Klishin <michael@clojurewerkz.org> Date: Tue Jun 14 17:41:09 2016 +0300 Continue adapting to Common Test commit 0a57f3256a828a835ce44ef02b2e93a3cfe34ccf Author: Michael Klishin <michael@clojurewerkz.org> Date: Tue Jun 14 15:28:19 2016 +0300 Begin moving test suite to Common Test
2016-06-24 18:27:05 +08:00
%% -------------------------------------------------------------------
tokenise_test(_Config) ->
[] = rabbit_mgmt_format:tokenise(""),
["foo"] = rabbit_mgmt_format:tokenise("foo"),
["foo", "bar"] = rabbit_mgmt_format:tokenise("foo~bar"),
["foo", "", "bar"] = rabbit_mgmt_format:tokenise("foo~~bar"),
ok.
Switch test suite to Common Test, fixes #233 Squashed commit of the following: commit b104a7f84474e247dfef27cd389d6fac554ab634 Author: Michael Klishin <michael@clojurewerkz.org> Date: Thu Jun 23 18:14:28 2016 +0300 Finish migration to CT Note: this intentionally deletes several tests that depend on ETS table state and clash with "real" stats GC processes running in parallel. Some of them are covered in other test suites, e.g. rabbit-hole, others can only really be tested with a separate simulation test suite. Per discussion with the team. commit 7585883e0f9432fd3360d18d340bcf599ad8d51f Author: Michael Klishin <michael@clojurewerkz.org> Date: Thu Jun 23 15:50:53 2016 +0300 Down to 3 failing tests commit 3243f0efed7033229803404a431c1c6404c25677 Author: Michael Klishin <michael@clojurewerkz.org> Date: Tue Jun 21 01:02:42 2016 +0300 Attempts to simplify a few tests for CT commit 997c2b3782b4ce38708658dc90883980a267a461 Merge: 122c7b7 0ce4f6b Author: Michael Klishin <michael@clojurewerkz.org> Date: Fri Jun 17 14:45:06 2016 +0300 Merge branch 'stable' into common_test commit 122c7b7116778e9aff244822933eaf95567dc59d Author: Michael Klishin <michael@clojurewerkz.org> Date: Thu Jun 16 18:19:28 2016 +0300 Begin porting test_db_SUITE commit 872f3e82966999cebd8ba966daac9410badaca09 Author: Michael Klishin <michael@clojurewerkz.org> Date: Thu Jun 16 13:54:34 2016 +0300 Makes clustering_SUITE pass commit c8d6c89bda6e7571877221ed6b2513e53b1ebc46 Author: Michael Klishin <michael@clojurewerkz.org> Date: Thu Jun 16 03:48:54 2016 +0300 Towards clustering_SUITE commit 7fcb6c834039d6cdf15371ce8640f6dfd9bdf939 Author: Michael Klishin <michael@clojurewerkz.org> Date: Thu Jun 16 02:59:24 2016 +0300 Initial clustering_SUITE test passes commit 11205579e86bad4563e027d025b94f0e57ee8386 Author: Michael Klishin <michael@clojurewerkz.org> Date: Thu Jun 16 02:59:12 2016 +0300 Add mochiweb to test dependencies commit 895ff82e6e6567336c2ac56532f82427a2c4f705 Author: Michael Klishin <michael@clojurewerkz.org> Date: Thu Jun 16 01:09:46 2016 +0300 Refactor commit 6d9200cc8516ee5ea0676fbb0e9b3c88fb2a40a7 Author: Michael Klishin <michael@clojurewerkz.org> Date: Thu Jun 16 00:55:08 2016 +0300 open_unmanaged_connection/1 is now available in rabbit_ct_client_helpers commit 40d03cd2fa2a6bc1d4c7c4a1eeb332c5182e1317 Author: Michael Klishin <michael@clojurewerkz.org> Date: Wed Jun 15 23:51:31 2016 +0300 All http_SUITE tests now pass commit 81e08ef36a08884c02fabd51662018751035b5b6 Author: Michael Klishin <michael@clojurewerkz.org> Date: Wed Jun 15 17:12:27 2016 +0300 More tests pass with Common Test commit aaea771db14624df0db944b4c4d0eb42191fb961 Author: Michael Klishin <michael@clojurewerkz.org> Date: Tue Jun 14 17:41:09 2016 +0300 Continue adapting to Common Test commit 0a57f3256a828a835ce44ef02b2e93a3cfe34ccf Author: Michael Klishin <michael@clojurewerkz.org> Date: Tue Jun 14 15:28:19 2016 +0300 Begin moving test suite to Common Test
2016-06-24 18:27:05 +08:00
pack_binding_test(_Config) ->
assert_binding(<<"~">>,
<<"">>, []),
assert_binding(<<"foo">>,
<<"foo">>, []),
2012-10-22 21:07:42 +08:00
assert_binding(<<"foo%7Ebar%2Fbash">>,
<<"foo~bar/bash">>, []),
assert_binding(<<"foo%7Ebar%7Ebash">>,
<<"foo~bar~bash">>, []),
ok.
path_prefix_test(_Config) ->
Got0 = rabbit_mgmt_util:get_path_prefix(),
?assertEqual("", Got0),
Pfx0 = "/custom-prefix",
application:set_env(rabbitmq_management, path_prefix, Pfx0),
Got1 = rabbit_mgmt_util:get_path_prefix(),
?assertEqual(Pfx0, Got1),
Pfx1 = "custom-prefix",
application:set_env(rabbitmq_management, path_prefix, Pfx1),
Got2 = rabbit_mgmt_util:get_path_prefix(),
?assertEqual(Pfx0, Got2),
Pfx2 = <<"custom-prefix">>,
application:set_env(rabbitmq_management, path_prefix, Pfx2),
Got3 = rabbit_mgmt_util:get_path_prefix(),
?assertEqual(Pfx0, Got3).
default_restrictions(_) ->
2023-02-07 11:25:09 +08:00
?assertEqual(false, rabbit_mgmt_features:is_op_policy_updating_disabled()).
%%--------------------------------------------------------------------
assert_binding(Packed, Routing, Args) ->
case rabbit_mgmt_format:pack_binding_props(Routing, Args) of
Packed ->
ok;
Act ->
throw({pack, Routing, Args, expected, Packed, got, Act})
end.