From 4ec10461604ef05580d594c9241ab810491ce27a Mon Sep 17 00:00:00 2001 From: Zaiming Shi Date: Thu, 20 May 2021 15:47:16 +0200 Subject: [PATCH] fix: bad test case --- apps/emqx_management/test/emqx_mgmt_api_SUITE.erl | 2 +- src/emqx_plugins.erl | 5 +++-- 2 files changed, 4 insertions(+), 3 deletions(-) diff --git a/apps/emqx_management/test/emqx_mgmt_api_SUITE.erl b/apps/emqx_management/test/emqx_mgmt_api_SUITE.erl index 1ba958cc5..bf3727ff5 100644 --- a/apps/emqx_management/test/emqx_mgmt_api_SUITE.erl +++ b/apps/emqx_management/test/emqx_mgmt_api_SUITE.erl @@ -322,7 +322,7 @@ t_plugins(_) -> auth_header_()), [Plugin3] = filter(get(<<"data">>, Plugins3), <<"name">>, <<"emqx_auth_mnesia">>), ?assertEqual(<<"emqx_auth_mnesia">>, maps:get(<<"name">>, Plugin3)), - ?assertEqual(false, maps:get(<<"active">>, Plugin3)), + ?assertEqual(true, maps:get(<<"active">>, Plugin3)), {ok, _} = request_api(put, api_path(["nodes", diff --git a/src/emqx_plugins.erl b/src/emqx_plugins.erl index 2616c1f70..f05da760e 100644 --- a/src/emqx_plugins.erl +++ b/src/emqx_plugins.erl @@ -225,10 +225,11 @@ filter_plugins(Names) -> end, Names). load_plugins(Names, Persistent) -> - Plugins = list(), NotFound = Names -- names(Plugins), + Plugins = list(), + NotFound = Names -- names(Plugins), case NotFound of [] -> ok; - NotFound -> ?LOG(alert, "Cannot find plugins: ~p", [NotFound]) + NotFound -> ?LOG(alert, "cannot_find_plugins: ~p", [NotFound]) end, NeedToLoad = Names -- NotFound -- names(started_app), lists:foreach(fun(Name) ->