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

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

Thales Macedo Garitezi пре 2 година
родитељ
комит
14b99737e9

+ 1 - 1
apps/emqx_bridge_confluent/test/emqx_bridge_confluent_tests.erl

@@ -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).

+ 1 - 1
apps/emqx_bridge_mqtt/src/emqx_bridge_mqtt_pubsub_schema.erl

@@ -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) ->

+ 0 - 5
apps/emqx_bridge_pgsql/test/emqx_bridge_pgsql_SUITE.erl

@@ -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),