Add more test cases for emqx_sys
This commit is contained in:
parent
63fb6f2fd0
commit
f1ae430d43
|
@ -45,6 +45,11 @@
|
||||||
, terminate/2
|
, terminate/2
|
||||||
]).
|
]).
|
||||||
|
|
||||||
|
-ifdef(TEST).
|
||||||
|
-compile(export_all).
|
||||||
|
-compile(nowarn_export_all).
|
||||||
|
-endif.
|
||||||
|
|
||||||
-import(emqx_topic, [systop/1]).
|
-import(emqx_topic, [systop/1]).
|
||||||
-import(emqx_misc, [start_timer/2]).
|
-import(emqx_misc, [start_timer/2]).
|
||||||
|
|
||||||
|
|
|
@ -49,8 +49,11 @@ end_per_suite(_Config) ->
|
||||||
% t_sysdescr(_) ->
|
% t_sysdescr(_) ->
|
||||||
% error('TODO').
|
% error('TODO').
|
||||||
|
|
||||||
% t_uptime(_) ->
|
t_uptime(_) ->
|
||||||
% error('TODO').
|
?assertEqual(<<"1 seconds">>, iolist_to_binary(emqx_sys:uptime(seconds, 1))),
|
||||||
|
?assertEqual(<<"1 minutes, 0 seconds">>, iolist_to_binary(emqx_sys:uptime(seconds, 60))),
|
||||||
|
?assertEqual(<<"1 hours, 0 minutes, 0 seconds">>, iolist_to_binary(emqx_sys:uptime(seconds, 3600))),
|
||||||
|
?assertEqual(<<"1 days, 0 hours, 0 minutes, 0 seconds">>, iolist_to_binary(emqx_sys:uptime(seconds, 86400))).
|
||||||
|
|
||||||
% t_datetime(_) ->
|
% t_datetime(_) ->
|
||||||
% error('TODO').
|
% error('TODO').
|
||||||
|
|
Loading…
Reference in New Issue