Merge pull request #1202 from emqtt/develop

Add test case for hot configuration
This commit is contained in:
Feng Lee 2017-08-14 09:37:36 +08:00 committed by GitHub
commit a22ecaf1f1
2 changed files with 34 additions and 1 deletions

View File

@ -15,6 +15,13 @@
%%-------------------------------------------------------------------- %%--------------------------------------------------------------------
%% @doc Hot Configuration %% @doc Hot Configuration
%%
%% TODO: How to persist the configuration?
%%
%% 1. Store in mnesia database?
%% 2. Store in dets?
%% 3. Store in data/app.config?
%%
-module(emqttd_config). -module(emqttd_config).
@ -25,7 +32,7 @@
%% @doc Read the configuration of an application. %% @doc Read the configuration of an application.
-spec(read(atom()) -> {ok, list(env())} | {error, term()}). -spec(read(atom()) -> {ok, list(env())} | {error, term()}).
read(_App) -> read(_App) ->
%% TODO %% TODO:
%% 1. Read the app.conf from etc folder %% 1. Read the app.conf from etc folder
%% 2. Cuttlefish to read the conf %% 2. Cuttlefish to read the conf
%% 3. Return the terms and schema %% 3. Return the terms and schema

View File

@ -0,0 +1,26 @@
%%--------------------------------------------------------------------
%% Copyright (c) 2013-2017 EMQ Enterprise, Inc. (http://emqtt.io)
%%
%% Licensed under the Apache License, Version 2.0 (the "License");
%% you may not use this file except in compliance with the License.
%% You may obtain a copy of the License at
%%
%% http://www.apache.org/licenses/LICENSE-2.0
%%
%% Unless required by applicable law or agreed to in writing, software
%% distributed under the License is distributed on an "AS IS" BASIS,
%% WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
%% See the License for the specific language governing permissions and
%% limitations under the License.
%%--------------------------------------------------------------------
-module(emqttd_config_SUITE).
-compile(export_all).
-include("emqttd.hrl").
all() -> [].
groups() -> [].