test: add a test case for emqx_machine:node_status
This commit is contained in:
parent
51cd83e70f
commit
d89975c6ee
|
@ -3,7 +3,7 @@
|
|||
{id, "emqx_machine"},
|
||||
{description, "The EMQX Machine"},
|
||||
% strict semver, bump manually!
|
||||
{vsn, "0.2.2"},
|
||||
{vsn, "0.2.3"},
|
||||
{modules, []},
|
||||
{registered, []},
|
||||
{applications, [kernel, stdlib, emqx_ctl]},
|
||||
|
|
|
@ -103,3 +103,13 @@ t_custom_shard_transports(_Config) ->
|
|||
emqx_machine:start(),
|
||||
?assertEqual(distr, mria_config:shard_transport(Shard)),
|
||||
ok.
|
||||
|
||||
t_node_status(_Config) ->
|
||||
JSON = emqx_machine:node_status(),
|
||||
?assertMatch(
|
||||
#{
|
||||
<<"backend">> := _,
|
||||
<<"role">> := <<"core">>
|
||||
},
|
||||
jsx:decode(JSON)
|
||||
).
|
||||
|
|
Loading…
Reference in New Issue