Merge pull request #4843 from zmstone/chore-no-app-version-print-at-boot
chore(emqx_ctl): do not print application
This commit is contained in:
commit
d5229301d0
|
@ -31,7 +31,7 @@ emqx_test(){
|
||||||
echo "running ${packagename} start"
|
echo "running ${packagename} start"
|
||||||
"${PACKAGE_PATH}"/emqx/bin/emqx start || ( tail "${PACKAGE_PATH}"/emqx/log/emqx.log.1 && exit 1 )
|
"${PACKAGE_PATH}"/emqx/bin/emqx start || ( tail "${PACKAGE_PATH}"/emqx/log/emqx.log.1 && exit 1 )
|
||||||
IDLE_TIME=0
|
IDLE_TIME=0
|
||||||
while [ -z "$("${PACKAGE_PATH}"/emqx/bin/emqx_ctl status |grep 'is running'|awk '{print $1}')" ]
|
while ! "${PACKAGE_PATH}"/emqx/bin/emqx_ctl status | grep -qE 'Node\s.*@.*\sis\sstarted'
|
||||||
do
|
do
|
||||||
if [ $IDLE_TIME -gt 10 ]
|
if [ $IDLE_TIME -gt 10 ]
|
||||||
then
|
then
|
||||||
|
@ -103,7 +103,7 @@ running_test(){
|
||||||
|
|
||||||
emqx start || ( tail /var/log/emqx/emqx.log.1 && exit 1 )
|
emqx start || ( tail /var/log/emqx/emqx.log.1 && exit 1 )
|
||||||
IDLE_TIME=0
|
IDLE_TIME=0
|
||||||
while [ -z "$(emqx_ctl status |grep 'is running'|awk '{print $1}')" ]
|
while ! emqx_ctl status | grep -qE 'Node\s.*@.*\sis\sstarted'
|
||||||
do
|
do
|
||||||
if [ $IDLE_TIME -gt 10 ]
|
if [ $IDLE_TIME -gt 10 ]
|
||||||
then
|
then
|
||||||
|
@ -121,7 +121,7 @@ running_test(){
|
||||||
|| [ "$(sed -n '/^ID=/p' /etc/os-release | sed -r 's/ID=(.*)/\1/g' | sed 's/"//g')" = debian ] ;then
|
|| [ "$(sed -n '/^ID=/p' /etc/os-release | sed -r 's/ID=(.*)/\1/g' | sed 's/"//g')" = debian ] ;then
|
||||||
service emqx start || ( tail /var/log/emqx/emqx.log.1 && exit 1 )
|
service emqx start || ( tail /var/log/emqx/emqx.log.1 && exit 1 )
|
||||||
IDLE_TIME=0
|
IDLE_TIME=0
|
||||||
while [ -z "$(emqx_ctl status |grep 'is running'|awk '{print $1}')" ]
|
while ! emqx_ctl status | grep -E 'Node\s.*@.*\sis\sstarted'
|
||||||
do
|
do
|
||||||
if [ $IDLE_TIME -gt 10 ]
|
if [ $IDLE_TIME -gt 10 ]
|
||||||
then
|
then
|
||||||
|
|
|
@ -2,11 +2,13 @@
|
||||||
{"4.3.2",
|
{"4.3.2",
|
||||||
[ {<<"4.3.[0-1]">>,
|
[ {<<"4.3.[0-1]">>,
|
||||||
[ {load_module, emqx_mgmt_data_backup, brutal_purge, soft_purge, []}
|
[ {load_module, emqx_mgmt_data_backup, brutal_purge, soft_purge, []}
|
||||||
|
, {load_module, emqx_mgmt_cli, brutal_purge, soft_purge, []}
|
||||||
]}
|
]}
|
||||||
],
|
],
|
||||||
[
|
[
|
||||||
{<<"4.3.[0-1]">>,
|
{<<"4.3.[0-1]">>,
|
||||||
[ {load_module, emqx_mgmt_data_backup, brutal_purge, soft_purge, []}
|
[ {load_module, emqx_mgmt_data_backup, brutal_purge, soft_purge, []}
|
||||||
|
, {load_module, emqx_mgmt_cli, brutal_purge, soft_purge, []}
|
||||||
]}
|
]}
|
||||||
]
|
]
|
||||||
}.
|
}.
|
||||||
|
|
|
@ -116,13 +116,7 @@ mgmt(_) ->
|
||||||
|
|
||||||
status([]) ->
|
status([]) ->
|
||||||
{InternalStatus, _ProvidedStatus} = init:get_status(),
|
{InternalStatus, _ProvidedStatus} = init:get_status(),
|
||||||
emqx_ctl:print("Node ~p ~s is ~p~n", [node(), emqx_app:get_release(), InternalStatus]),
|
emqx_ctl:print("Node ~p ~s is ~p~n", [node(), emqx_app:get_release(), InternalStatus]);
|
||||||
case lists:keysearch(?APP, 1, application:which_applications()) of
|
|
||||||
false ->
|
|
||||||
emqx_ctl:print("Application ~s is not running~n", [?APP]);
|
|
||||||
{value, {?APP, _Desc, Vsn}} ->
|
|
||||||
emqx_ctl:print("Application ~s ~s is running~n", [?APP, Vsn])
|
|
||||||
end;
|
|
||||||
status(_) ->
|
status(_) ->
|
||||||
emqx_ctl:usage("status", "Show broker status").
|
emqx_ctl:usage("status", "Show broker status").
|
||||||
|
|
||||||
|
|
|
@ -133,7 +133,8 @@ t_mgmt_cmd(_) ->
|
||||||
t_status_cmd(_) ->
|
t_status_cmd(_) ->
|
||||||
% ct:pal("start testing status command"),
|
% ct:pal("start testing status command"),
|
||||||
mock_print(),
|
mock_print(),
|
||||||
?assertMatch({match, _}, re:run(emqx_mgmt_cli:status([]), "is running")),
|
%% init internal status seem to be always 'starting' when running ct tests
|
||||||
|
?assertMatch({match, _}, re:run(emqx_mgmt_cli:status([]), "Node\s.*@.*\sis\sstart(ed|ing)")),
|
||||||
meck:unload().
|
meck:unload().
|
||||||
|
|
||||||
t_broker_cmd(_) ->
|
t_broker_cmd(_) ->
|
||||||
|
|
Loading…
Reference in New Issue