test(bridges): add timescale && matrix test cases

This commit is contained in:
firest 2023-01-09 15:37:01 +08:00
parent e08d6dbc9b
commit 062f14bd65
1 changed files with 16 additions and 4 deletions

View File

@ -45,14 +45,20 @@ groups() ->
[ [
{tcp, [ {tcp, [
{group, with_batch}, {group, with_batch},
{group, without_batch} {group, without_batch},
{group, matrix},
{group, timescale}
]}, ]},
{tls, [ {tls, [
{group, with_batch}, {group, with_batch},
{group, without_batch} {group, without_batch},
{group, matrix},
{group, timescale}
]}, ]},
{with_batch, TCs -- NonBatchCases}, {with_batch, TCs -- NonBatchCases},
{without_batch, TCs} {without_batch, TCs},
{matrix, [t_setup_via_config_and_publish, t_setup_via_http_api_and_publish]},
{timescale, [t_setup_via_config_and_publish, t_setup_via_http_api_and_publish]}
]. ].
init_per_group(tcp, Config) -> init_per_group(tcp, Config) ->
@ -83,6 +89,12 @@ init_per_group(with_batch, Config0) ->
init_per_group(without_batch, Config0) -> init_per_group(without_batch, Config0) ->
Config = [{enable_batch, false} | Config0], Config = [{enable_batch, false} | Config0],
common_init(Config); common_init(Config);
init_per_group(matrix, Config0) ->
Config = [{bridge_type, <<"matrix">>}, {enable_batch, true} | Config0],
common_init(Config);
init_per_group(timescale, Config0) ->
Config = [{bridge_type, <<"timescale">>}, {enable_batch, true} | Config0],
common_init(Config);
init_per_group(_Group, Config) -> init_per_group(_Group, Config) ->
Config. Config.
@ -122,7 +134,7 @@ end_per_testcase(_Testcase, Config) ->
%%------------------------------------------------------------------------------ %%------------------------------------------------------------------------------
common_init(Config0) -> common_init(Config0) ->
BridgeType = <<"pgsql">>, BridgeType = proplists:get_value(bridge_type, Config0, <<"pgsql">>),
Host = ?config(pgsql_host, Config0), Host = ?config(pgsql_host, Config0),
Port = ?config(pgsql_port, Config0), Port = ?config(pgsql_port, Config0),
case emqx_common_test_helpers:is_tcp_server_available(Host, Port) of case emqx_common_test_helpers:is_tcp_server_available(Host, Port) of