Browse Source

test(ci): add plugin list status check after relup new vsn install

Zaiming Shi 4 years ago
parent
commit
c7fe49c200

+ 9 - 1
.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:

+ 16 - 0
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, []}}
+    ]},
+   {<<".*">>, []}
+ ]
+}.

+ 3 - 0
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]}