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([])). ?assertEqual(ExpRawConf, emqx:get_raw_config([])).
t_cluster_hocon_import_mqtt_subscribers_retainer_messages(Config) -> t_cluster_hocon_import_mqtt_subscribers_retainer_messages(Config) ->
FNameEmqx44 = "emqx-export-4.4.24-retainer-mqttsub.tar.gz", case emqx_release:edition() of
BackupFile = filename:join(?config(data_dir, Config), FNameEmqx44), ce ->
Exp = {ok, #{db_errors => #{}, config_errors => #{}}}, ok;
?assertEqual(Exp, emqx_mgmt_data_backup:import(BackupFile)), ee ->
RawConfAfterImport = emqx:get_raw_config([]), FNameEmqx44 = "emqx-export-4.4.24-retainer-mqttsub.tar.gz",
%% verify that MQTT sources are imported BackupFile = filename:join(?config(data_dir, Config), FNameEmqx44),
?assertMatch( Exp = {ok, #{db_errors => #{}, config_errors => #{}}},
#{<<"sources">> := #{<<"mqtt">> := Sources}} when map_size(Sources) > 0, ?assertEqual(Exp, emqx_mgmt_data_backup:import(BackupFile)),
RawConfAfterImport RawConfAfterImport = emqx:get_raw_config([]),
), %% verify that MQTT sources are imported
%% verify that retainer messages are imported ?assertMatch(
?assertMatch( #{<<"sources">> := #{<<"mqtt">> := Sources}} when map_size(Sources) > 0,
{ok, [#message{payload = <<"test-payload">>}]}, RawConfAfterImport
emqx_retainer:read_message(<<"test-retained-message/1">>) ),
), %% verify that retainer messages are imported
%% Export and import again ?assertMatch(
{ok, #{filename := FileName}} = emqx_mgmt_data_backup:export(), {ok, [#message{payload = <<"test-payload">>}]},
?assertEqual(Exp, emqx_mgmt_data_backup:import(FileName)), emqx_retainer:read_message(<<"test-retained-message/1">>)
?assertEqual(RawConfAfterImport, emqx:get_raw_config([])), ),
%% 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. ok.
t_cluster_hocon_export_import(Config) -> 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 "$runner")")
entries+=("$(format_app_entry "$app" 1 emqx-enterprise "$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/*) apps/*)
if [[ -f "${app}/BSL.txt" ]]; then if [[ -f "${app}/BSL.txt" ]]; then
profile='emqx-enterprise' profile='emqx-enterprise'