fix(mqtt_bridge): add missing fields to POST api spec; fix test
This commit is contained in:
parent
7befe898d0
commit
14b99737e9
|
@ -72,7 +72,7 @@ parse(Hocon) ->
|
||||||
Conf.
|
Conf.
|
||||||
|
|
||||||
check(SchemaMod, Conf) when is_map(Conf) ->
|
check(SchemaMod, Conf) when is_map(Conf) ->
|
||||||
hocon_tconf:check_plain(SchemaMod, Conf).
|
hocon_tconf:check_plain(SchemaMod, Conf, #{required => false}).
|
||||||
|
|
||||||
check_action(Conf) when is_map(Conf) ->
|
check_action(Conf) when is_map(Conf) ->
|
||||||
check(emqx_bridge_v2_schema, Conf).
|
check(emqx_bridge_v2_schema, Conf).
|
||||||
|
|
|
@ -91,7 +91,7 @@ fields("get_connector") ->
|
||||||
fields("get_bridge_v2") ->
|
fields("get_bridge_v2") ->
|
||||||
fields("mqtt_publisher_action");
|
fields("mqtt_publisher_action");
|
||||||
fields("post_bridge_v2") ->
|
fields("post_bridge_v2") ->
|
||||||
fields("mqtt_publisher_action");
|
fields("mqtt_publisher_action") ++ emqx_bridge_schema:type_and_name_fields(mqtt);
|
||||||
fields("put_bridge_v2") ->
|
fields("put_bridge_v2") ->
|
||||||
fields("mqtt_publisher_action");
|
fields("mqtt_publisher_action");
|
||||||
fields(What) ->
|
fields(What) ->
|
||||||
|
|
|
@ -166,11 +166,6 @@ common_init(Config0) ->
|
||||||
#{work_dir => emqx_cth_suite:work_dir(Config0)}
|
#{work_dir => emqx_cth_suite:work_dir(Config0)}
|
||||||
),
|
),
|
||||||
{ok, _Api} = emqx_common_test_http:create_default_app(),
|
{ok, _Api} = emqx_common_test_http:create_default_app(),
|
||||||
|
|
||||||
%% ok = emqx_common_test_helpers:start_apps([emqx, emqx_postgresql, emqx_conf, emqx_bridge]),
|
|
||||||
%% _ = emqx_bridge_enterprise:module_info(),
|
|
||||||
%% emqx_mgmt_api_test_util:init_suite(),
|
|
||||||
|
|
||||||
% Connect to pgsql directly and create the table
|
% Connect to pgsql directly and create the table
|
||||||
connect_and_create_table(Config0),
|
connect_and_create_table(Config0),
|
||||||
{Name, PGConf} = pgsql_config(BridgeType, Config0),
|
{Name, PGConf} = pgsql_config(BridgeType, Config0),
|
||||||
|
|
Loading…
Reference in New Issue