fix: emqx_auth_postgresql test suites
This commit is contained in:
parent
6ef9c6fe4a
commit
c5e281b84b
|
@ -798,7 +798,8 @@ parse_id(Id) ->
|
|||
end.
|
||||
|
||||
get_channels_for_connector(ConnectorId) ->
|
||||
{ConnectorType, ConnectorName} = emqx_connector_resource:parse_connector_id(ConnectorId),
|
||||
try emqx_connector_resource:parse_connector_id(ConnectorId) of
|
||||
{ConnectorType, ConnectorName} ->
|
||||
RootConf = maps:keys(emqx:get_config([?ROOT_KEY], #{})),
|
||||
RelevantBridgeV2Types = [
|
||||
Type
|
||||
|
@ -808,7 +809,13 @@ get_channels_for_connector(ConnectorId) ->
|
|||
lists:flatten([
|
||||
get_channels_for_connector(ConnectorName, BridgeV2Type)
|
||||
|| BridgeV2Type <- RelevantBridgeV2Types
|
||||
]).
|
||||
])
|
||||
catch
|
||||
_:_ ->
|
||||
%% ConnectorId is not a valid connector id so we assume the connector
|
||||
%% has no channels (e.g. it is a a connector for authn or authz)
|
||||
[]
|
||||
end.
|
||||
|
||||
get_channels_for_connector(ConnectorName, BridgeV2Type) ->
|
||||
BridgeV2s = emqx:get_config([?ROOT_KEY, BridgeV2Type], #{}),
|
||||
|
|
|
@ -61,7 +61,7 @@ end_per_testcase(_, _Config) ->
|
|||
|
||||
t_lifecycle(_Config) ->
|
||||
perform_lifecycle_check(
|
||||
<<"connector:pgsql:emqx_postgresql_SUITE">>,
|
||||
<<"emqx_postgresql_SUITE">>,
|
||||
pgsql_config()
|
||||
).
|
||||
|
||||
|
|
Loading…
Reference in New Issue