Просмотр исходного кода

test: add eunit test for schema dump

Zaiming (Stone) Shi 4 лет назад
Родитель
Сommit
4a336b6b4e

+ 13 - 0
apps/emqx_conf/test/emqx_conf_schema_tests.erl

@@ -0,0 +1,13 @@
+%%--------------------------------------------------------------------
+%% Copyright (c) 2022 EMQ Technologies Co., Ltd. All Rights Reserved.
+%%--------------------------------------------------------------------
+
+-module(emqx_conf_schema_tests).
+
+-include_lib("eunit/include/eunit.hrl").
+
+doc_gen_test() ->
+    Dir = "tmp",
+    ok = filelib:ensure_dir(filename:join("tmp", foo)),
+    _ = emqx_conf:dump_schema(Dir),
+    ok.

+ 13 - 0
lib-ee/emqx_enterprise_conf/test/emqx_enterprise_conf_schema_tests.erl

@@ -0,0 +1,13 @@
+%%--------------------------------------------------------------------
+%% Copyright (c) 2022 EMQ Technologies Co., Ltd. All Rights Reserved.
+%%--------------------------------------------------------------------
+
+-module(emqx_enterprise_conf_schema_tests).
+
+-include_lib("eunit/include/eunit.hrl").
+
+doc_gen_test() ->
+    Dir = "tmp",
+    ok = filelib:ensure_dir(filename:join("tmp", foo)),
+    _ = emqx_conf:dump_schema(Dir, emqx_enterprise_conf_schema),
+    ok.