Skip to content
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
10 changes: 7 additions & 3 deletions deps/rabbit/src/rabbit_access_control.erl
Original file line number Diff line number Diff line change
Expand Up @@ -113,7 +113,7 @@ is_auth_backend_module_enabled(Mod) when is_atom(Mod) ->
case rabbit_plugins:which_plugin(Mod) of
{ok, PluginName} ->
%% FIXME: The definition of an "enabled plugin" in
%% `rabbit_plugins' varies from funtion to function.
%% `rabbit_plugins' varies from function to function.
%% Sometimes, it means the "rabbitmq-plugin enable
%% <plugin>" was executed, sometimes it means the plugin
%% is running.
Expand Down Expand Up @@ -141,7 +141,7 @@ is_auth_backend_module_enabled(Mod) when is_atom(Mod) ->
"it will be skipped during "
"authentication/authorization",
[Mod, PluginName]),
false
is_test_auth_backend_module(Mod)
end;
{error, no_provider} ->
?LOG_INFO(
Expand All @@ -150,10 +150,14 @@ is_auth_backend_module_enabled(Mod) when is_atom(Mod) ->
"module. Until then it will be skipped during "
"authentication/authorization",
[Mod]),
false
is_test_auth_backend_module(Mod)
end
end.

is_test_auth_backend_module(Mod) ->
Mods = application:get_env(rabbit, test_auth_backends, []),
lists:member(Mod, Mods).

-spec check_user_pass_login
(rabbit_types:username(), rabbit_types:password()) ->
{'ok', rabbit_types:user()} |
Expand Down
10 changes: 7 additions & 3 deletions deps/rabbit/test/rabbit_fifo_dlx_integration_SUITE.erl
Original file line number Diff line number Diff line change
Expand Up @@ -158,8 +158,12 @@ end_per_testcase(Testcase, Config) ->
delete_queue(Ch, ?config(target_queue_6, Config)),
#'exchange.delete_ok'{} = amqp_channel:call(Ch, #'exchange.delete'{exchange = ?config(dead_letter_exchange, Config)}),

DlxWorkers = rabbit_ct_broker_helpers:rpc_all(Config, supervisor, which_children, [rabbit_fifo_dlx_sup]),
?assert(lists:all(fun(L) -> L =:= [] end, DlxWorkers)),
?awaitMatch(
true,
begin
DlxWorkers = rabbit_ct_broker_helpers:rpc_all(Config, supervisor, which_children, [rabbit_fifo_dlx_sup]),
lists:all(fun(L) -> L =:= [] end, DlxWorkers)
end, 60000),

Config1 = rabbit_ct_helpers:run_steps(
Config,
Expand Down Expand Up @@ -960,7 +964,7 @@ single_dlx_worker(Config) ->
assert_active_dlx_workers(1, Config, Leader1).

assert_active_dlx_workers(N, Config, Server) ->
?assertEqual(N, length(rpc(Config, Server, supervisor, which_children, [rabbit_fifo_dlx_sup], 2000))).
?awaitMatch(N, length(rpc(Config, Server, supervisor, which_children, [rabbit_fifo_dlx_sup], 2000)), 60000).

declare_queue(Channel, Queue, Args) ->
#'queue.declare_ok'{} = amqp_channel:call(Channel, #'queue.declare'{
Expand Down
3 changes: 2 additions & 1 deletion deps/rabbitmq_mqtt/test/auth_SUITE.erl
Original file line number Diff line number Diff line change
Expand Up @@ -251,7 +251,8 @@ auth_config(T) when T == client_id_propagation;
T == ssl_user_with_client_id_in_cert_san_email;
T == ssl_user_with_client_id_in_cert_dn ->
{rabbit, [
{auth_backends, [rabbit_auth_backend_mqtt_mock]}
{auth_backends, [rabbit_auth_backend_mqtt_mock]},
{test_auth_backends, [rabbit_auth_backend_mqtt_mock]}
]
};

Expand Down
16 changes: 13 additions & 3 deletions deps/rabbitmq_mqtt/test/config_schema_SUITE.erl
Original file line number Diff line number Diff line change
Expand Up @@ -21,7 +21,12 @@ all() ->
init_per_suite(Config) ->
rabbit_ct_helpers:log_environment(),
Config1 = rabbit_ct_helpers:run_setup_steps(Config),
rabbit_ct_config_schema:init_schemas(rabbitmq_mqtt, Config1).
case Config1 of
_ when is_list(Config1) ->
rabbit_ct_config_schema:init_schemas(rabbitmq_mqtt, Config1);
{skip, _} ->
Config1
end.


end_per_suite(Config) ->
Expand All @@ -37,8 +42,13 @@ init_per_testcase(Testcase, Config) ->
Config1,
rabbit_ct_broker_helpers:setup_steps() ++
rabbit_ct_client_helpers:setup_steps()),
util:enable_plugin(Config2, rabbitmq_mqtt),
Config2.
case Config2 of
_ when is_list(Config2) ->
util:enable_plugin(Config2, rabbitmq_mqtt),
Config2;
{skip, _} ->
Config2
end.

end_per_testcase(Testcase, Config) ->
Config1 = rabbit_ct_helpers:run_steps(Config,
Expand Down
Loading