fix(resource): update test cases on resource not_found
This commit is contained in:
parent
b74a9bfda1
commit
efec4564f0
|
@ -146,9 +146,8 @@ t_destroy(_Config) ->
|
|||
?GLOBAL),
|
||||
|
||||
% Authenticator should not be usable anymore
|
||||
?assertException(
|
||||
error,
|
||||
_,
|
||||
?assertMatch(
|
||||
ignore,
|
||||
emqx_authn_mongodb:authenticate(
|
||||
#{username => <<"plain">>,
|
||||
password => <<"plain">>
|
||||
|
|
|
@ -159,9 +159,8 @@ t_destroy(_Config) ->
|
|||
?GLOBAL),
|
||||
|
||||
% Authenticator should not be usable anymore
|
||||
?assertException(
|
||||
error,
|
||||
_,
|
||||
?assertMatch(
|
||||
ignore,
|
||||
emqx_authn_mysql:authenticate(
|
||||
#{username => <<"plain">>,
|
||||
password => <<"plain">>
|
||||
|
|
|
@ -159,9 +159,8 @@ t_destroy(_Config) ->
|
|||
?GLOBAL),
|
||||
|
||||
% Authenticator should not be usable anymore
|
||||
?assertException(
|
||||
error,
|
||||
_,
|
||||
?assertMatch(
|
||||
ignore,
|
||||
emqx_authn_pgsql:authenticate(
|
||||
#{username => <<"plain">>,
|
||||
password => <<"plain">>
|
||||
|
|
|
@ -164,9 +164,8 @@ t_destroy(_Config) ->
|
|||
?GLOBAL),
|
||||
|
||||
% Authenticator should not be usable anymore
|
||||
?assertException(
|
||||
error,
|
||||
_,
|
||||
?assertMatch(
|
||||
ignore,
|
||||
emqx_authn_redis:authenticate(
|
||||
#{username => <<"plain">>,
|
||||
password => <<"plain">>
|
||||
|
|
|
@ -96,9 +96,7 @@ t_query(_) ->
|
|||
?assert(false)
|
||||
end,
|
||||
|
||||
?assertException(
|
||||
error,
|
||||
{get_instance, _Reason},
|
||||
?assertMatch({error, {emqx_resource, #{reason := not_found}}},
|
||||
emqx_resource:query(<<"unknown">>, get_state)),
|
||||
|
||||
ok = emqx_resource:remove_local(?ID).
|
||||
|
@ -142,7 +140,8 @@ t_stop_start(_) ->
|
|||
|
||||
?assertNot(is_process_alive(Pid0)),
|
||||
|
||||
?assertMatch({emqx_resource, #{reason := stopped}}, emqx_resource:query(?ID, get_state)),
|
||||
?assertMatch({error, {emqx_resource, #{reason := stopped}}},
|
||||
emqx_resource:query(?ID, get_state)),
|
||||
|
||||
ok = emqx_resource:restart(?ID),
|
||||
|
||||
|
|
Loading…
Reference in New Issue