ci: run emqx_management both with ee and ce profile

This commit is contained in:
Shawn 2024-04-07 18:23:59 +08:00
parent 1c81c79a2c
commit e89dc32c90
2 changed files with 28 additions and 19 deletions

View File

@ -88,25 +88,30 @@ t_empty_export_import(_Config) ->
?assertEqual(ExpRawConf, emqx:get_raw_config([])).
t_cluster_hocon_import_mqtt_subscribers_retainer_messages(Config) ->
FNameEmqx44 = "emqx-export-4.4.24-retainer-mqttsub.tar.gz",
BackupFile = filename:join(?config(data_dir, Config), FNameEmqx44),
Exp = {ok, #{db_errors => #{}, config_errors => #{}}},
?assertEqual(Exp, emqx_mgmt_data_backup:import(BackupFile)),
RawConfAfterImport = emqx:get_raw_config([]),
%% verify that MQTT sources are imported
?assertMatch(
#{<<"sources">> := #{<<"mqtt">> := Sources}} when map_size(Sources) > 0,
RawConfAfterImport
),
%% verify that retainer messages are imported
?assertMatch(
{ok, [#message{payload = <<"test-payload">>}]},
emqx_retainer:read_message(<<"test-retained-message/1">>)
),
%% Export and import again
{ok, #{filename := FileName}} = emqx_mgmt_data_backup:export(),
?assertEqual(Exp, emqx_mgmt_data_backup:import(FileName)),
?assertEqual(RawConfAfterImport, emqx:get_raw_config([])),
case emqx_release:edition() of
ce ->
ok;
ee ->
FNameEmqx44 = "emqx-export-4.4.24-retainer-mqttsub.tar.gz",
BackupFile = filename:join(?config(data_dir, Config), FNameEmqx44),
Exp = {ok, #{db_errors => #{}, config_errors => #{}}},
?assertEqual(Exp, emqx_mgmt_data_backup:import(BackupFile)),
RawConfAfterImport = emqx:get_raw_config([]),
%% verify that MQTT sources are imported
?assertMatch(
#{<<"sources">> := #{<<"mqtt">> := Sources}} when map_size(Sources) > 0,
RawConfAfterImport
),
%% verify that retainer messages are imported
?assertMatch(
{ok, [#message{payload = <<"test-payload">>}]},
emqx_retainer:read_message(<<"test-retained-message/1">>)
),
%% Export and import again
{ok, #{filename := FileName}} = emqx_mgmt_data_backup:export(),
?assertEqual(Exp, emqx_mgmt_data_backup:import(FileName)),
?assertEqual(RawConfAfterImport, emqx:get_raw_config([]))
end,
ok.
t_cluster_hocon_export_import(Config) ->

View File

@ -101,6 +101,10 @@ matrix() {
entries+=("$(format_app_entry "$app" 1 emqx "$runner")")
entries+=("$(format_app_entry "$app" 1 emqx-enterprise "$runner")")
;;
apps/emqx_management)
entries+=("$(format_app_entry "$app" 1 emqx "$runner")")
entries+=("$(format_app_entry "$app" 1 emqx-enterprise "$runner")")
;;
apps/*)
if [[ -f "${app}/BSL.txt" ]]; then
profile='emqx-enterprise'