Преглед изворни кода

Merge pull request #12152 from zhongwencool/license-watermark

fix: license watermark percent support float
zhongwencool пре 2 година
родитељ
комит
ccb947a0a1
4 измењених фајлова са 5 додато и 5 уклоњено
  1. 1 1
      apps/emqx/rebar.config
  2. 2 2
      apps/emqx_license/test/emqx_license_http_api_SUITE.erl
  3. 1 1
      mix.exs
  4. 1 1
      rebar.config

+ 1 - 1
apps/emqx/rebar.config

@@ -30,7 +30,7 @@
     {esockd, {git, "https://github.com/emqx/esockd", {tag, "5.9.9"}}},
     {ekka, {git, "https://github.com/emqx/ekka", {tag, "0.17.0"}}},
     {gen_rpc, {git, "https://github.com/emqx/gen_rpc", {tag, "3.3.0"}}},
-    {hocon, {git, "https://github.com/emqx/hocon.git", {tag, "0.40.1"}}},
+    {hocon, {git, "https://github.com/emqx/hocon.git", {tag, "0.40.2"}}},
     {emqx_http_lib, {git, "https://github.com/emqx/emqx_http_lib.git", {tag, "0.5.3"}}},
     {pbkdf2, {git, "https://github.com/emqx/erlang-pbkdf2.git", {tag, "2.0.4"}}},
     {recon, {git, "https://github.com/ferd/recon", {tag, "2.5.1"}}},

+ 2 - 2
apps/emqx_license/test/emqx_license_http_api_SUITE.erl

@@ -205,14 +205,14 @@ t_license_setting(_Config) ->
     ?assertEqual(0.55, emqx_config:get([license, connection_high_watermark])),
 
     %% update
-    Low1 = <<"50%">>,
+    Low1 = <<"50.12%">>,
     High1 = <<"100%">>,
     UpdateRes1 = request(put, uri(["license", "setting"]), #{
         <<"connection_low_watermark">> => Low1,
         <<"connection_high_watermark">> => High1
     }),
     validate_setting(UpdateRes1, Low1, High1),
-    ?assertEqual(0.5, emqx_config:get([license, connection_low_watermark])),
+    ?assertEqual(0.5012, emqx_config:get([license, connection_low_watermark])),
     ?assertEqual(1.0, emqx_config:get([license, connection_high_watermark])),
 
     %% update bad setting low >= high

+ 1 - 1
mix.exs

@@ -72,7 +72,7 @@ defmodule EMQXUmbrella.MixProject do
       # in conflict by emqtt and hocon
       {:getopt, "1.0.2", override: true},
       {:snabbkaffe, github: "kafka4beam/snabbkaffe", tag: "1.0.8", override: true},
-      {:hocon, github: "emqx/hocon", tag: "0.40.1", override: true},
+      {:hocon, github: "emqx/hocon", tag: "0.40.2", override: true},
       {:emqx_http_lib, github: "emqx/emqx_http_lib", tag: "0.5.3", override: true},
       {:esasl, github: "emqx/esasl", tag: "0.2.0"},
       {:jose, github: "potatosalad/erlang-jose", tag: "1.11.2"},

+ 1 - 1
rebar.config

@@ -84,7 +84,7 @@
     , {system_monitor, {git, "https://github.com/ieQu1/system_monitor", {tag, "3.0.3"}}}
     , {getopt, "1.0.2"}
     , {snabbkaffe, {git, "https://github.com/kafka4beam/snabbkaffe.git", {tag, "1.0.8"}}}
-    , {hocon, {git, "https://github.com/emqx/hocon.git", {tag, "0.40.1"}}}
+    , {hocon, {git, "https://github.com/emqx/hocon.git", {tag, "0.40.2"}}}
     , {emqx_http_lib, {git, "https://github.com/emqx/emqx_http_lib.git", {tag, "0.5.3"}}}
     , {esasl, {git, "https://github.com/emqx/esasl", {tag, "0.2.0"}}}
     , {jose, {git, "https://github.com/potatosalad/erlang-jose", {tag, "1.11.2"}}}