fix(mqtt_bridge): add missing fields to POST api spec; fix test

This commit is contained in:
Thales Macedo Garitezi 2023-12-19 17:59:02 -03:00
parent 7befe898d0
commit 14b99737e9
3 changed files with 2 additions and 7 deletions

View File

@ -72,7 +72,7 @@ parse(Hocon) ->
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(emqx_bridge_v2_schema, Conf).

View File

@ -91,7 +91,7 @@ fields("get_connector") ->
fields("get_bridge_v2") ->
fields("mqtt_publisher_action");
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("mqtt_publisher_action");
fields(What) ->

View File

@ -166,11 +166,6 @@ common_init(Config0) ->
#{work_dir => emqx_cth_suite:work_dir(Config0)}
),
{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_and_create_table(Config0),
{Name, PGConf} = pgsql_config(BridgeType, Config0),