Merge pull request #10386 from HJianBo/refactor-directoires

refactor(gw): rename all gateway application name
This commit is contained in:
JianBo He 2023-04-14 19:26:53 +08:00 committed by GitHub
commit a0cfac3a1a
No known key found for this signature in database
GPG Key ID: 4AEE18F83AFDEB23
117 changed files with 58 additions and 58 deletions

View File

@ -68,11 +68,11 @@ end_per_testcase(_TestCase, _Config) ->
t_registered_gateway(_) ->
[
{coap, #{cbkmod := emqx_coap}},
{exproto, #{cbkmod := emqx_exproto}},
{lwm2m, #{cbkmod := emqx_lwm2m}},
{mqttsn, #{cbkmod := emqx_mqttsn}},
{stomp, #{cbkmod := emqx_stomp}}
{coap, #{cbkmod := emqx_gateway_coap}},
{exproto, #{cbkmod := emqx_gateway_exproto}},
{lwm2m, #{cbkmod := emqx_gateway_lwm2m}},
{mqttsn, #{cbkmod := emqx_gateway_mqttsn}},
{stomp, #{cbkmod := emqx_gateway_stomp}}
] = emqx_gateway:registered_gateway().
t_load_unload_list_lookup(_) ->
@ -192,7 +192,7 @@ setup_fake_usage_data(Lwm2mDataDir) ->
[
emqx_common_test_helpers:proj_root(),
"apps",
"emqx_lwm2m",
"emqx_gateway_lwm2m",
"lwm2m_xml"
]
),

View File

@ -219,7 +219,7 @@ t_gateway_lwm2m(_) ->
[
emqx_common_test_helpers:proj_root(),
"apps",
"emqx_lwm2m",
"emqx_gateway_lwm2m",
"lwm2m_xml"
]
),

View File

@ -117,11 +117,11 @@ t_gateway_registry_usage(_) ->
t_gateway_registry_list(_) ->
emqx_gateway_cli:'gateway-registry'(["list"]),
?assertEqual(
"Registered Name: coap, Callback Module: emqx_coap\n"
"Registered Name: exproto, Callback Module: emqx_exproto\n"
"Registered Name: lwm2m, Callback Module: emqx_lwm2m\n"
"Registered Name: mqttsn, Callback Module: emqx_mqttsn\n"
"Registered Name: stomp, Callback Module: emqx_stomp\n",
"Registered Name: coap, Callback Module: emqx_gateway_coap\n"
"Registered Name: exproto, Callback Module: emqx_gateway_exproto\n"
"Registered Name: lwm2m, Callback Module: emqx_gateway_lwm2m\n"
"Registered Name: mqttsn, Callback Module: emqx_gateway_mqttsn\n"
"Registered Name: stomp, Callback Module: emqx_gateway_stomp\n",
acc_print()
).

View File

@ -102,11 +102,11 @@ assert_fields_exist(Ks, Map) ->
Ks
).
load_all_gateway_apps() ->
application:load(emqx_stomp),
application:load(emqx_mqttsn),
application:load(emqx_coap),
application:load(emqx_lwm2m),
application:load(emqx_exproto).
application:load(emqx_gateway_stomp),
application:load(emqx_gateway_mqttsn),
application:load(emqx_gateway_coap),
application:load(emqx_gateway_lwm2m),
application:load(emqx_gateway_exproto).
%%--------------------------------------------------------------------
%% http

View File

Before

Width:  |  Height:  |  Size: 75 KiB

After

Width:  |  Height:  |  Size: 75 KiB

View File

Before

Width:  |  Height:  |  Size: 31 KiB

After

Width:  |  Height:  |  Size: 31 KiB

View File

Before

Width:  |  Height:  |  Size: 148 KiB

After

Width:  |  Height:  |  Size: 148 KiB

View File

@ -1,4 +1,4 @@
{application, emqx_coap, [
{application, emqx_gateway_coap, [
{description, "CoAP Gateway"},
{vsn, "0.1.0"},
{registered, []},

View File

@ -15,7 +15,7 @@
%%--------------------------------------------------------------------
%% @doc The CoAP Gateway implement
-module(emqx_coap).
-module(emqx_gateway_coap).
-include_lib("emqx/include/logger.hrl").
-include_lib("emqx_gateway/include/emqx_gateway.hrl").

View File

@ -56,7 +56,7 @@
all() -> emqx_common_test_helpers:all(?MODULE).
init_per_suite(Config) ->
application:load(emqx_coap),
application:load(emqx_gateway_coap),
ok = emqx_common_test_helpers:load_config(emqx_gateway_schema, ?CONF_DEFAULT),
emqx_mgmt_api_test_util:init_suite([emqx_authn, emqx_gateway]),
ok = meck:new(emqx_access_control, [passthrough, no_history, no_link]),

View File

@ -56,7 +56,7 @@ all() ->
emqx_common_test_helpers:all(?MODULE).
init_per_suite(Config) ->
application:load(emqx_coap),
application:load(emqx_gateway_coap),
ok = emqx_common_test_helpers:load_config(emqx_gateway_schema, ?CONF_DEFAULT),
emqx_mgmt_api_test_util:init_suite([emqx_authn, emqx_gateway]),
Config.

View File

@ -1,4 +1,4 @@
{application, emqx_exproto, [
{application, emqx_gateway_exproto, [
{description, "ExProto Gateway"},
{vsn, "0.1.0"},
{registered, []},

View File

@ -15,7 +15,7 @@
%%--------------------------------------------------------------------
%% @doc The ExProto Gateway implement
-module(emqx_exproto).
-module(emqx_gateway_exproto).
-include_lib("emqx/include/logger.hrl").
-include_lib("emqx_gateway/include/emqx_gateway.hrl").

View File

@ -76,7 +76,7 @@ metrics() ->
[tcp, ssl, udp, dtls].
init_per_group(GrpName, Cfg) ->
application:load(emqx_exproto),
application:load(emqx_gateway_exproto),
put(grpname, GrpName),
Svrs = emqx_exproto_echo_svr:start(),
emqx_common_test_helpers:start_apps([emqx_authn, emqx_gateway], fun set_special_cfg/1),

View File

@ -1,8 +1,8 @@
{application, emqx_lwm2m, [
{application, emqx_gateway_lwm2m, [
{description, "LwM2M Gateway"},
{vsn, "0.1.0"},
{registered, []},
{applications, [kernel, stdlib, emqx, emqx_gateway, emqx_coap]},
{applications, [kernel, stdlib, emqx, emqx_gateway, emqx_gateway_coap]},
{env, []},
{modules, []},
{licenses, ["Apache 2.0"]},

View File

@ -15,7 +15,7 @@
%%--------------------------------------------------------------------
%% @doc The LwM2M Gateway implement
-module(emqx_lwm2m).
-module(emqx_gateway_lwm2m).
-include_lib("emqx/include/logger.hrl").
-include_lib("emqx_gateway/include/emqx_gateway.hrl").

View File

@ -18,7 +18,7 @@
-include("emqx_lwm2m.hrl").
-include_lib("emqx/include/logger.hrl").
-include_lib("emqx_coap/include/emqx_coap.hrl").
-include_lib("emqx_gateway_coap/include/emqx_coap.hrl").
%% API
-export([

View File

@ -18,7 +18,7 @@
-include("emqx_lwm2m.hrl").
-include_lib("emqx/include/logger.hrl").
-include_lib("emqx_coap/include/emqx_coap.hrl").
-include_lib("emqx_gateway_coap/include/emqx_coap.hrl").
-export([
mqtt_to_coap/2,

View File

@ -20,7 +20,7 @@
-include_lib("emqx/include/emqx.hrl").
-include_lib("emqx/include/emqx_mqtt.hrl").
-include_lib("snabbkaffe/include/snabbkaffe.hrl").
-include_lib("emqx_coap/include/emqx_coap.hrl").
-include_lib("emqx_gateway_coap/include/emqx_coap.hrl").
%% API
-export([

View File

@ -32,7 +32,7 @@
-define(LOGT(Format, Args), ct:pal("TEST_SUITE: " ++ Format, Args)).
-include("emqx_lwm2m.hrl").
-include_lib("emqx_coap/include/emqx_coap.hrl").
-include_lib("emqx_gateway_coap/include/emqx_coap.hrl").
-include_lib("eunit/include/eunit.hrl").
-include_lib("common_test/include/ct.hrl").
-include_lib("snabbkaffe/include/snabbkaffe.hrl").
@ -134,7 +134,7 @@ groups() ->
init_per_suite(Config) ->
%% load application first for minirest api searching
application:load(emqx_gateway),
application:load(emqx_lwm2m),
application:load(emqx_gateway_lwm2m),
emqx_mgmt_api_test_util:init_suite([emqx_conf, emqx_authn]),
Config.
@ -181,7 +181,7 @@ default_config(Overrides) ->
[
emqx_common_test_helpers:proj_root(),
"apps",
"emqx_lwm2m",
"emqx_gateway_lwm2m",
"lwm2m_xml"
]
),

View File

@ -24,7 +24,7 @@
-define(LOGT(Format, Args), ct:pal("TEST_SUITE: " ++ Format, Args)).
-include("emqx_lwm2m.hrl").
-include("emqx_coap/include/emqx_coap.hrl").
-include("emqx_gateway_coap/include/emqx_coap.hrl").
-include_lib("eunit/include/eunit.hrl").
-include_lib("common_test/include/ct.hrl").
@ -59,7 +59,7 @@ all() ->
init_per_suite(Config) ->
application:load(emqx_gateway),
application:load(emqx_lwm2m),
application:load(emqx_gateway_lwm2m),
DefaultConfig = emqx_lwm2m_SUITE:default_config(),
ok = emqx_common_test_helpers:load_config(emqx_gateway_schema, DefaultConfig),
emqx_mgmt_api_test_util:init_suite([emqx_conf, emqx_authn]),

View File

@ -22,7 +22,7 @@
-define(LOGT(Format, Args), logger:debug("TEST_SUITE: " ++ Format, Args)).
-include("emqx_lwm2m.hrl").
-include("emqx_coap/include/emqx_coap.hrl").
-include("emqx_gateway_coap/include/emqx_coap.hrl").
-include_lib("eunit/include/eunit.hrl").
%%--------------------------------------------------------------------

View File

@ -1,4 +1,4 @@
{application, emqx_mqttsn, [
{application, emqx_gateway_mqttsn, [
{description, "MQTT-SN Gateway"},
{vsn, "0.1.0"},
{registered, []},

View File

@ -15,7 +15,7 @@
%%--------------------------------------------------------------------
%% @doc The MQTT-SN Gateway implement interface
-module(emqx_mqttsn).
-module(emqx_gateway_mqttsn).
-include_lib("emqx/include/logger.hrl").

View File

@ -97,7 +97,7 @@ all() ->
emqx_common_test_helpers:all(?MODULE).
init_per_suite(Config) ->
application:load(emqx_mqttsn),
application:load(emqx_gateway_mqttsn),
ok = emqx_common_test_helpers:load_config(emqx_gateway_schema, ?CONF_DEFAULT),
emqx_mgmt_api_test_util:init_suite([emqx_conf, emqx_authn, emqx_gateway]),
Config.

Some files were not shown because too many files have changed in this diff Show More