Przeglądaj źródła

test: fix dashboard schema json test cases

zmstone 1 rok temu
rodzic
commit
dfd13b4ab5

+ 1 - 1
apps/emqx_bridge_kafka/test/emqx_bridge_kafka_tests.erl

@@ -357,7 +357,7 @@ kafka_consumer_hocon() ->
 
 %% assert compatibility
 bridge_schema_json_test() ->
-    JSON = iolist_to_binary(emqx_conf:bridge_schema_json()),
+    JSON = iolist_to_binary(emqx_dashboard_schema_api:bridge_schema_json()),
     Map = emqx_utils_json:decode(JSON),
     Path = [<<"components">>, <<"schemas">>, <<"bridge_kafka.post_producer">>, <<"properties">>],
     ?assertMatch(#{<<"kafka">> := _}, emqx_utils_maps:deep_get(Path, Map)).

+ 3 - 0
apps/emqx_dashboard/src/emqx_dashboard_schema_api.erl

@@ -30,6 +30,9 @@
 
 -export([get_schema/2]).
 
+%% for test
+-export([bridge_schema_json/0]).
+
 -define(TAGS, [<<"dashboard">>]).
 -define(BAD_REQUEST, 'BAD_REQUEST').