Pārlūkot izejas kodu

fix(mgmt): fix test case crash

JianBo He 3 gadi atpakaļ
vecāks
revīzija
8db8598622

+ 4 - 3
apps/emqx_authn/test/emqx_authn_mnesia_SUITE.erl

@@ -96,9 +96,9 @@ t_update(_) ->
 
 t_destroy(_) ->
     Config = config(),
-    OtherId = list_to_binary([?AUTHN_ID, <<"-other">>]),
+    OtherConfig = Config#{user_group => <<"stomp:global">>},
     {ok, State0} = emqx_authn_mnesia:create(?AUTHN_ID, Config),
-    {ok, StateOther} = emqx_authn_mnesia:create(OtherId, Config),
+    {ok, StateOther} = emqx_authn_mnesia:create(?AUTHN_ID, OtherConfig),
 
     User = #{user_id => <<"u">>, password => <<"p">>},
 
@@ -282,5 +282,6 @@ config() ->
         password_hash_algorithm => #{
             name => bcrypt,
             salt_rounds => 8
-        }
+        },
+        user_group => <<"global:mqtt">>
     }.

+ 12 - 4
apps/emqx_management/test/emqx_mgmt_cli_SUITE.erl

@@ -38,12 +38,20 @@ set_special_configs(emqx_dashboard) ->
     Config = #{
         default_username => <<"admin">>,
         default_password => <<"public">>,
-        listeners => [
+        listeners =>
             #{
-                protocol => http,
-                port => 18083
+                http =>
+                    #{
+                        backlog => 512,
+                        bind => 18083,
+                        enable => true,
+                        inet6 => false,
+                        ipv6_v6only => false,
+                        max_connections => 512,
+                        num_acceptors => 4,
+                        send_timeout => 5000
+                    }
             }
-        ]
     },
     emqx_config:put([dashboard], Config),
     ok;