test: fix dashboard schema json test cases

This commit is contained in:
zmstone 2024-04-11 15:12:01 +02:00
parent eac25194e5
commit dfd13b4ab5
2 changed files with 4 additions and 1 deletions

View File

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

View File

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