fix: ignore unwanted results
This commit is contained in:
parent
6530604f40
commit
5b0ee30d72
|
@ -638,7 +638,8 @@ do_authenticate([#authenticator{id = ID, provider = Provider, state = State} | M
|
||||||
{ok, _} ->
|
{ok, _} ->
|
||||||
emqx_plugin_libs_metrics:inc(authn_metrics, ID, success);
|
emqx_plugin_libs_metrics:inc(authn_metrics, ID, success);
|
||||||
{error, _} ->
|
{error, _} ->
|
||||||
emqx_plugin_libs_metrics:inc(authn_metrics, ID, failed)
|
emqx_plugin_libs_metrics:inc(authn_metrics, ID, failed);
|
||||||
|
_ -> ok
|
||||||
end,
|
end,
|
||||||
{stop, Result}
|
{stop, Result}
|
||||||
catch
|
catch
|
||||||
|
|
|
@ -326,9 +326,9 @@ test_authenticator_users(PathPrefix) ->
|
||||||
} = jiffy:decode(PageData0, [return_maps]);
|
} = jiffy:decode(PageData0, [return_maps]);
|
||||||
["listeners",'tcp:default'] ->
|
["listeners",'tcp:default'] ->
|
||||||
#{ <<"metrics">> := #{
|
#{ <<"metrics">> := #{
|
||||||
<<"matched">> := 3,
|
<<"matched">> := 1,
|
||||||
<<"success">> := 1,
|
<<"success">> := 0,
|
||||||
<<"ignore">> := 2
|
<<"ignore">> := 1
|
||||||
}
|
}
|
||||||
} = jiffy:decode(PageData0, [return_maps])
|
} = jiffy:decode(PageData0, [return_maps])
|
||||||
end,
|
end,
|
||||||
|
@ -380,9 +380,9 @@ test_authenticator_users(PathPrefix) ->
|
||||||
} = jiffy:decode(PageData01, [return_maps]);
|
} = jiffy:decode(PageData01, [return_maps]);
|
||||||
["listeners",'tcp:default'] ->
|
["listeners",'tcp:default'] ->
|
||||||
#{ <<"metrics">> := #{
|
#{ <<"metrics">> := #{
|
||||||
<<"matched">> := 4,
|
<<"matched">> := 2,
|
||||||
<<"success">> := 2,
|
<<"success">> := 1,
|
||||||
<<"ignore">> := 2
|
<<"ignore">> := 1
|
||||||
}
|
}
|
||||||
} = jiffy:decode(PageData01, [return_maps])
|
} = jiffy:decode(PageData01, [return_maps])
|
||||||
end,
|
end,
|
||||||
|
|
Loading…
Reference in New Issue