From f33585b7f46ecc7984ae72b4c7ed4a0af70dcc13 Mon Sep 17 00:00:00 2001 From: William Yang Date: Thu, 26 Aug 2021 14:19:54 +0200 Subject: [PATCH] test: mask invalid anonymous_test In EMQX 5.0, auth are moved to plugins --- test/emqtt_SUITE.erl | 31 +++++++++++++++++-------------- 1 file changed, 17 insertions(+), 14 deletions(-) diff --git a/test/emqtt_SUITE.erl b/test/emqtt_SUITE.erl index 2029e154..84b237d1 100644 --- a/test/emqtt_SUITE.erl +++ b/test/emqtt_SUITE.erl @@ -58,7 +58,7 @@ groups() -> [basic_test_v3]}, {mqttv4, [non_parallel_tests], [basic_test_v4, - anonymous_test, + %% anonymous_test, retry_interval_test, will_message_test, will_retain_message_test, @@ -321,21 +321,24 @@ basic_test_v3(_Config) -> basic_test_v4(_Config) -> basic_test([{proto_ver, v4}]). -anonymous_test(_Config) -> - application:set_env(emqx, allow_anonymous, false), - process_flag(trap_exit, true), - {ok, C1} = emqtt:start_link(), - {_,{unauthorized_client,_}} = emqtt:connect(C1), - receive {'EXIT', _, _} -> ok - after 500 -> error("allow_anonymous") - end, - process_flag(trap_exit, false), +%%$ NOTE, Mask the test anonymous_test for emqx 5.0 since `auth' is moved out of emqx core app - application:set_env(emqx, allow_anonymous, true), - {ok, C2} = emqtt:start_link([{username, <<"test">>}, {password, <<"password">>}]), - {ok, _} = emqtt:connect(C2), - ok = emqtt:disconnect(C2). +%% anonymous_test(_Config) -> +%% application:set_env(emqx, allow_anonymous, false), + +%% process_flag(trap_exit, true), +%% {ok, C1} = emqtt:start_link(), +%% {_,{unauthorized_client,_}} = emqtt:connect(C1), +%% receive {'EXIT', _, _} -> ok +%% after 500 -> error("allow_anonymous") +%% end, +%% process_flag(trap_exit, false), + +%% application:set_env(emqx, allow_anonymous, true), +%% {ok, C2} = emqtt:start_link([{username, <<"test">>}, {password, <<"password">>}]), +%% {ok, _} = emqtt:connect(C2), +%% ok = emqtt:disconnect(C2). retry_interval_test(_Config) -> {ok, Pub} = emqtt:start_link([{clean_start, true}, {retry_interval, 1}]),