Zhongwen Deng 2 лет назад
Родитель
Сommit
e065904583

+ 1 - 1
apps/emqx_dashboard/src/emqx_dashboard.app.src

@@ -2,7 +2,7 @@
 {application, emqx_dashboard, [
     {description, "EMQX Web Dashboard"},
     % strict semver, bump manually!
-    {vsn, "5.0.21"},
+    {vsn, "5.0.22"},
     {modules, []},
     {registered, [emqx_dashboard_sup]},
     {applications, [kernel, stdlib, mnesia, minirest, emqx, emqx_ctl]},

+ 1 - 1
apps/emqx_machine/src/emqx_machine.app.src

@@ -3,7 +3,7 @@
     {id, "emqx_machine"},
     {description, "The EMQX Machine"},
     % strict semver, bump manually!
-    {vsn, "0.2.4"},
+    {vsn, "0.2.5"},
     {modules, []},
     {registered, []},
     {applications, [kernel, stdlib, emqx_ctl]},

+ 26 - 0
lib-ee/emqx_license/test/emqx_license_cli_SUITE.erl

@@ -53,3 +53,29 @@ t_update(_Config) ->
     _ = emqx_license_cli:license(["update", LicenseValue]),
     _ = emqx_license_cli:license(["reload"]),
     _ = emqx_license_cli:license(["update", "Invalid License Value"]).
+
+t_conf_update(_Config) ->
+    ok = persistent_term:put(
+        emqx_license_test_pubkey,
+        emqx_license_test_lib:public_key_pem()
+    ),
+    LicenseKey = emqx_license_test_lib:make_license(#{max_connections => "123"}),
+    Conf = #{
+        <<"connection_high_watermark">> => <<"50%">>,
+        <<"connection_low_watermark">> => <<"45%">>,
+        <<"key">> => LicenseKey
+    },
+    ?assertMatch({ok, _}, emqx:update_config([license], Conf)),
+    ?assertEqual(
+        #{
+            connection_high_watermark => 0.5,
+            connection_low_watermark => 0.45,
+            key => LicenseKey
+        },
+        emqx:get_config([license])
+    ),
+    ?assertMatch(
+        #{max_connections := 123},
+        maps:from_list(emqx_license_checker:dump())
+    ),
+    ok.