test: fix test cases for pgsql authz

This commit is contained in:
zhouzb 2022-01-13 16:53:47 +08:00
parent 683d1c3412
commit 5e2bc7853f
2 changed files with 5 additions and 3 deletions

View File

@ -167,7 +167,7 @@ t_pgsql_error(_Config) ->
listener => {tcp, default}
},
ok = setup_config(
{error, _} = setup_config(
#{<<"query">> => <<"SOME INVALID STATEMENT">>}),
ok = emqx_authz_test_lib:test_samples(

View File

@ -40,8 +40,10 @@ reset_authorizers(Nomatch, ChacheEnabled) ->
setup_config(BaseConfig, SpecialParams) ->
Config = maps:merge(BaseConfig, SpecialParams),
{ok, _} = emqx_authz:update(?CMD_REPLACE, [Config]),
ok.
case emqx_authz:update(?CMD_REPLACE, [Config]) of
{ok, _} -> ok;
{error, Reason} -> {error, Reason}
end.
is_tcp_server_available(Host, Port) ->
case gen_tcp:connect(Host, Port, [], ?DEFAULT_CHECK_AVAIL_TIMEOUT) of