3535
3636 control_action /2 , control_action /3 , control_action /4 ,
3737 rabbitmqctl /3 , rabbitmqctl /4 , rabbitmqctl_list /3 ,
38- rabbitmq_queues /3 ,
38+ rabbitmq_queues /3 , rabbitmq_diagnostics / 3 ,
3939
4040 add_code_path_to_node /2 ,
4141 add_code_path_to_all_nodes /2 ,
@@ -219,6 +219,7 @@ setup_steps() ->
219219 fun rabbit_ct_helpers :ensure_rabbitmqctl_cmd /1 ,
220220 fun rabbit_ct_helpers :ensure_rabbitmqctl_app /1 ,
221221 fun rabbit_ct_helpers :ensure_rabbitmq_plugins_cmd /1 ,
222+ fun rabbit_ct_helpers :ensure_rabbitmq_diagnostics_cmd /1 ,
222223 fun set_lager_flood_limit /1 ,
223224 fun configure_metadata_store /1 ,
224225 fun start_rabbitmq_nodes /1 ,
@@ -229,6 +230,7 @@ setup_steps() ->
229230 fun rabbit_ct_helpers :ensure_rabbitmqctl_cmd /1 ,
230231 fun rabbit_ct_helpers :load_rabbitmqctl_app /1 ,
231232 fun rabbit_ct_helpers :ensure_rabbitmq_plugins_cmd /1 ,
233+ fun rabbit_ct_helpers :ensure_rabbitmq_diagnostics_cmd /1 ,
232234 fun set_lager_flood_limit /1 ,
233235 fun configure_metadata_store /1 ,
234236 fun start_rabbitmq_nodes /1 ,
@@ -1565,6 +1567,21 @@ rabbitmq_queues(Config, Node, Args) ->
15651567 Cmd = [RabbitmqQueues , " -n" , Nodename | Args ],
15661568 rabbit_ct_helpers :exec (Cmd , [{env , Env }]).
15671569
1570+ rabbitmq_diagnostics (Config , Node , Args ) ->
1571+ Rabbitmqdiagnostics = ? config (rabbitmq_diagnostics_cmd , Config ),
1572+ NodeConfig = get_node_config (Config , Node ),
1573+ Nodename = ? config (nodename , NodeConfig ),
1574+ Env = [
1575+ {" RABBITMQ_SCRIPTS_DIR" , filename :dirname (Rabbitmqdiagnostics )},
1576+ {" RABBITMQ_PID_FILE" , ? config (pid_file , NodeConfig )},
1577+ {" RABBITMQ_MNESIA_DIR" , ? config (data_dir , NodeConfig )},
1578+ {" RABBITMQ_PLUGINS_DIR" , ? config (plugins_dir , NodeConfig )},
1579+ {" RABBITMQ_ENABLED_PLUGINS_FILE" ,
1580+ ? config (enabled_plugins_file , NodeConfig )}
1581+ ],
1582+ Cmd = [Rabbitmqdiagnostics , " -n" , Nodename | Args ],
1583+ rabbit_ct_helpers :exec (Cmd , [{env , Env }]).
1584+
15681585% % -------------------------------------------------------------------
15691586% % Other helpers.
15701587% % -------------------------------------------------------------------
0 commit comments