Testsuite: Adapt to the plugins-related changes in rabbit_ct_broker_helpers

This commit is contained in:
Jean-Sébastien Pédron 2016-06-14 17:21:25 +02:00
parent 92fa979164
commit beb23cb1b7
2 changed files with 9 additions and 4 deletions

View File

@ -1,6 +1,7 @@
PROJECT = rabbitmq_auth_backend_cache
DEPS = rabbit_common
TEST_DEPS += rabbit
DEP_PLUGINS = rabbit_common/mk/rabbitmq-plugin.mk
@ -11,5 +12,9 @@ ERLANG_MK_REPO = https://github.com/rabbitmq/erlang.mk.git
ERLANG_MK_COMMIT = rabbitmq-tmp
include rabbitmq-components.mk
# FIXME: Remove rabbitmq_test as TEST_DEPS from here for now.
TEST_DEPS := $(filter-out rabbitmq_test,$(TEST_DEPS))
include erlang.mk

View File

@ -14,12 +14,12 @@ all() ->
init_per_suite(Config) ->
rabbit_ct_helpers:log_environment(),
Config1 = rabbit_ct_helpers:set_config(Config, {plugins, [rabbitmq_auth_backend_cache]}),
rabbit_ct_helpers:run_setup_steps(Config1, rabbit_ct_broker_helpers:setup_steps() ++
rabbit_ct_helpers:run_setup_steps(Config, rabbit_ct_broker_helpers:setup_steps() ++
[ fun setup_env/1 ]).
setup_env(Config) ->
[rabbitmq_auth_backend_cache] = rpc(Config, rabbit_plugins, active, []),
true = lists:member(rabbitmq_auth_backend_cache,
rpc(Config, rabbit_plugins, active, [])),
application:set_env(rabbit, auth_backends, [rabbit_auth_backend_cache]),
Config.
@ -34,7 +34,7 @@ authentication_response(Config) ->
{refused, FailErr, FailArgs} = rpc(Config,rabbit_auth_backend_cache, user_login_authentication, [<<"guest">>, [{password, <<"notguest">>}]]).
authorization_response(Config) ->
{ok, Auth = #auth_user{impl = Impl, tags = Tags}} = rpc(Config,rabbit_auth_backend_internal, user_login_authentication, [<<"guest">>, [{password, <<"guest">>}]]),
{ok, #auth_user{impl = Impl, tags = Tags}} = rpc(Config,rabbit_auth_backend_internal, user_login_authentication, [<<"guest">>, [{password, <<"guest">>}]]),
{ok, Impl, Tags} = rpc(Config,rabbit_auth_backend_internal, user_login_authorization, [<<"guest">>]),
{ok, Impl, Tags} = rpc(Config,rabbit_auth_backend_cache, user_login_authorization, [<<"guest">>]),
{refused, FailErr, FailArgs} = rpc(Config,rabbit_auth_backend_internal, user_login_authorization, [<<"nonguest">>]),