chore: module and fun call rename

This commit is contained in:
JimMoen 2022-08-02 16:58:21 +08:00
parent d778a71d3b
commit 10b19acd35
10 changed files with 20 additions and 20 deletions

2
build
View File

@ -84,7 +84,7 @@ make_docs() {
fi fi
case $PROFILE in case $PROFILE in
emqx-enterprise) emqx-enterprise)
SCHEMA_MODULE='emqx_enterprise_conf_schema' SCHEMA_MODULE='emqx_ee_conf_schema'
;; ;;
*) *)
SCHEMA_MODULE='emqx_conf_schema' SCHEMA_MODULE='emqx_conf_schema'

View File

@ -13,7 +13,7 @@ acb3544d4b112121b5d9414237d2af7860ccc2a3
# reformat lib-ee/emqx_license # reformat lib-ee/emqx_license
4f396cceb84d79d5ef540e91c1a8420e8de74a56 4f396cceb84d79d5ef540e91c1a8420e8de74a56
4e3fd9febd0df11f3fe5f221cd2c4362be57c886 4e3fd9febd0df11f3fe5f221cd2c4362be57c886
# reformat lib-ee/emqx_enterprise_conf # reformat lib-ee/emqx_ee_conf
1aa82992616ad848539a533a5cd20ba6f9071e5a 1aa82992616ad848539a533a5cd20ba6f9071e5a
# reformat apps/emqx_gateway # reformat apps/emqx_gateway
3f6d78dda03fd0d8e968a352e134f11a7f16bfe8 3f6d78dda03fd0d8e968a352e134f11a7f16bfe8

View File

@ -1,3 +1,3 @@
# emqx_enterprise_conf # emqx_ee_conf
EMQX Enterprise configuration schema EMQX Enterprise configuration schema

View File

@ -1,6 +1,6 @@
{application, emqx_ee_conf, [ {application, emqx_ee_conf, [
{description, "EMQX Enterprise Edition configuration schema"}, {description, "EMQX Enterprise Edition configuration schema"},
{vsn, "0.1.1"}, {vsn, "0.1.0"},
{registered, []}, {registered, []},
{applications, [ {applications, [
kernel, kernel,

View File

@ -2,7 +2,7 @@
%% Copyright (c) 2022 EMQ Technologies Co., Ltd. All Rights Reserved. %% Copyright (c) 2022 EMQ Technologies Co., Ltd. All Rights Reserved.
%%-------------------------------------------------------------------- %%--------------------------------------------------------------------
-module(emqx_enterprise_conf_schema). -module(emqx_ee_conf_schema).
-behaviour(hocon_schema). -behaviour(hocon_schema).

View File

@ -2,7 +2,7 @@
%% Copyright (c) 2022 EMQ Technologies Co., Ltd. All Rights Reserved. %% Copyright (c) 2022 EMQ Technologies Co., Ltd. All Rights Reserved.
%%-------------------------------------------------------------------- %%--------------------------------------------------------------------
-module(emqx_enterprise_conf_schema_SUITE). -module(emqx_ee_conf_schema_SUITE).
-compile(nowarn_export_all). -compile(nowarn_export_all).
-compile(export_all). -compile(export_all).
@ -20,12 +20,12 @@ all() ->
t_namespace(_Config) -> t_namespace(_Config) ->
?assertEqual( ?assertEqual(
emqx_conf_schema:namespace(), emqx_conf_schema:namespace(),
emqx_enterprise_conf_schema:namespace() emqx_ee_conf_schema:namespace()
). ).
t_roots(_Config) -> t_roots(_Config) ->
BaseRoots = emqx_conf_schema:roots(), BaseRoots = emqx_conf_schema:roots(),
EnterpriseRoots = emqx_enterprise_conf_schema:roots(), EnterpriseRoots = emqx_ee_conf_schema:roots(),
?assertEqual([], BaseRoots -- EnterpriseRoots), ?assertEqual([], BaseRoots -- EnterpriseRoots),
@ -42,12 +42,12 @@ t_roots(_Config) ->
t_fields(_Config) -> t_fields(_Config) ->
?assertEqual( ?assertEqual(
emqx_conf_schema:fields("node"), emqx_conf_schema:fields("node"),
emqx_enterprise_conf_schema:fields("node") emqx_ee_conf_schema:fields("node")
). ).
t_translations(_Config) -> t_translations(_Config) ->
[Root | _] = emqx_enterprise_conf_schema:translations(), [Root | _] = emqx_ee_conf_schema:translations(),
?assertEqual( ?assertEqual(
emqx_conf_schema:translation(Root), emqx_conf_schema:translation(Root),
emqx_enterprise_conf_schema:translation(Root) emqx_ee_conf_schema:translation(Root)
). ).

View File

@ -2,7 +2,7 @@
%% Copyright (c) 2022 EMQ Technologies Co., Ltd. All Rights Reserved. %% Copyright (c) 2022 EMQ Technologies Co., Ltd. All Rights Reserved.
%%-------------------------------------------------------------------- %%--------------------------------------------------------------------
-module(emqx_enterprise_conf_schema_tests). -module(emqx_ee_conf_schema_tests).
-include_lib("eunit/include/eunit.hrl"). -include_lib("eunit/include/eunit.hrl").
@ -22,7 +22,7 @@ doc_gen_test() ->
"priv", "priv",
"i18n.conf" "i18n.conf"
]), ]),
_ = emqx_conf:dump_schema(Dir, emqx_enterprise_conf_schema, I18nFile), _ = emqx_conf:dump_schema(Dir, emqx_ee_conf_schema, I18nFile),
ok ok
end end
}. }.

View File

@ -104,10 +104,10 @@ setup_test(TestCase, Config) when
[ [
{apps, [emqx_conf, emqx_license]}, {apps, [emqx_conf, emqx_license]},
{load_schema, false}, {load_schema, false},
{schema_mod, emqx_enterprise_conf_schema}, {schema_mod, emqx_ee_conf_schema},
{env_handler, fun {env_handler, fun
(emqx) -> (emqx) ->
emqx_config:save_schema_mod_and_names(emqx_enterprise_conf_schema), emqx_config:save_schema_mod_and_names(emqx_ee_conf_schema),
%% emqx_config:save_schema_mod_and_names(emqx_license_schema), %% emqx_config:save_schema_mod_and_names(emqx_license_schema),
application:set_env(emqx, boot_modules, []), application:set_env(emqx, boot_modules, []),
application:set_env( application:set_env(
@ -121,7 +121,7 @@ setup_test(TestCase, Config) when
), ),
ok; ok;
(emqx_conf) -> (emqx_conf) ->
emqx_config:save_schema_mod_and_names(emqx_enterprise_conf_schema), emqx_config:save_schema_mod_and_names(emqx_ee_conf_schema),
%% emqx_config:save_schema_mod_and_names(emqx_license_schema), %% emqx_config:save_schema_mod_and_names(emqx_license_schema),
application:set_env( application:set_env(
emqx, emqx,

View File

@ -236,7 +236,7 @@ defmodule EMQXUmbrella.MixProject do
if(edition_type == :enterprise, if(edition_type == :enterprise,
do: [ do: [
emqx_license: :permanent, emqx_license: :permanent,
emqx_enterprise_conf: :load, emqx_ee_conf: :load,
emqx_ee_connector: :permanent, emqx_ee_connector: :permanent,
emqx_ee_bridge: :permanent emqx_ee_bridge: :permanent
], ],
@ -603,7 +603,7 @@ defmodule EMQXUmbrella.MixProject do
end end
end end
defp emqx_schema_mod(:enterprise), do: :emqx_enterprise_conf_schema defp emqx_schema_mod(:enterprise), do: :emqx_ee_conf_schema
defp emqx_schema_mod(:community), do: :emqx_conf_schema defp emqx_schema_mod(:community), do: :emqx_conf_schema
defp bcrypt_dep() do defp bcrypt_dep() do

View File

@ -280,7 +280,7 @@ overlay_vars_edition(ce) ->
]; ];
overlay_vars_edition(ee) -> overlay_vars_edition(ee) ->
[ [
{emqx_schema_mod, emqx_enterprise_conf_schema}, {emqx_schema_mod, emqx_ee_conf_schema},
{is_enterprise, "yes"} {is_enterprise, "yes"}
]. ].
@ -378,7 +378,7 @@ is_app(Name) ->
relx_apps_per_edition(ee) -> relx_apps_per_edition(ee) ->
[ [
emqx_license, emqx_license,
{emqx_enterprise_conf, load}, {emqx_ee_conf, load},
emqx_ee_connector, emqx_ee_connector,
emqx_ee_bridge emqx_ee_bridge
]; ];