From c7fe49c20092ac71784da42be360ff2914bc56ae Mon Sep 17 00:00:00 2001 From: Zaiming Shi Date: Mon, 21 Jun 2021 09:47:00 +0200 Subject: [PATCH] test(ci): add plugin list status check after relup new vsn install --- .ci/fvt_tests/relup.lux | 10 +++++++++- apps/emqx_dashboard/src/emqx_dashboard.appup.src | 16 ++++++++++++++++ scripts/inject-deps.escript | 3 +++ 3 files changed, 28 insertions(+), 1 deletion(-) create mode 100644 apps/emqx_dashboard/src/emqx_dashboard.appup.src diff --git a/.ci/fvt_tests/relup.lux b/.ci/fvt_tests/relup.lux index 33c35cb3e..91c11d3ae 100644 --- a/.ci/fvt_tests/relup.lux +++ b/.ci/fvt_tests/relup.lux @@ -43,7 +43,7 @@ !sed -i '/emqx_telemetry/d' data/loaded_plugins !./bin/emqx start - ?EMQ X (.*) is started successfully! + ?EMQ X .* is started successfully! ?SH-PROMPT !./bin/emqx_ctl cluster join emqx@127.0.0.1 @@ -99,6 +99,10 @@ """ ?SH-PROMPT + !./bin/emqx_ctl plugins list | grep emqx_management + ?Plugin\(emqx_management.*active=true\) + ?SH-PROMPT + [shell emqx2] !echo "" > log/emqx.log.1 ?SH-PROMPT @@ -120,6 +124,10 @@ """ ?SH-PROMPT + !./bin/emqx_ctl plugins list | grep emqx_management + ?Plugin\(emqx_management.*active=true\) + ?SH-PROMPT + [shell bench] ???publish complete ??SH-PROMPT: diff --git a/apps/emqx_dashboard/src/emqx_dashboard.appup.src b/apps/emqx_dashboard/src/emqx_dashboard.appup.src new file mode 100644 index 000000000..678bd3b22 --- /dev/null +++ b/apps/emqx_dashboard/src/emqx_dashboard.appup.src @@ -0,0 +1,16 @@ +%% -*- mode: erlang -*- +{VSN, + [ {"4.3.0", + %% load all plugins + %% NOTE: this depends on the fact that emqx_dashboard is always + %% the last application gets upgraded + [ {apply, {emqx_plugins, load, []}} + ]}, + {<<".*">>, []} + ], + [ {"4.3.0", + [ {apply, {emqx_plugins, load, []}} + ]}, + {<<".*">>, []} + ] +}. diff --git a/scripts/inject-deps.escript b/scripts/inject-deps.escript index e0c50d772..1465acc8f 100755 --- a/scripts/inject-deps.escript +++ b/scripts/inject-deps.escript @@ -35,6 +35,9 @@ deps(_Profile) -> base_deps(). base_deps() -> + %% make sure emqx_dashboard depends on all other emqx_xxx apps + %% so the appup instructions for emqx_dashboard is always the last + %% to be executed [ {emqx_dashboard, [{re, "emqx_.*"}]} , {emqx_management, [{re, "emqx_.*"}, {exclude, emqx_dashboard}]} , {{re, "emqx_.*"}, [emqx]}