Skip to content

Commit 92ca64e

Browse files
committed
rabbitmq_ct_helpers: Fix how we locate rabbitmqctl from secondary umbrella
We use the same code as `do_start_rabbitmq_node/3`.
1 parent f51cc10 commit 92ca64e

File tree

1 file changed

+18
-21
lines changed

1 file changed

+18
-21
lines changed

deps/rabbitmq_ct_helpers/src/rabbit_ct_broker_helpers.erl

Lines changed: 18 additions & 21 deletions
Original file line numberDiff line numberDiff line change
@@ -1269,31 +1269,28 @@ rabbitmqctl(Config, Node, Args, Timeout) ->
12691269
_ ->
12701270
CanUseSecondary
12711271
end,
1272+
WithPlugins0 = rabbit_ct_helpers:get_config(Config,
1273+
broker_with_plugins),
1274+
WithPlugins = case is_list(WithPlugins0) of
1275+
true -> lists:nth(I + 1, WithPlugins0);
1276+
false -> WithPlugins0
1277+
end,
12721278
Rabbitmqctl = case UseSecondaryUmbrella of
12731279
true ->
12741280
case BazelRunSecCmd of
12751281
undefined ->
1276-
SrcDir = ?config(
1277-
secondary_rabbit_srcdir,
1278-
Config),
1279-
SecDepsDir = ?config(
1280-
secondary_erlang_mk_depsdir,
1281-
Config),
1282-
SecNewScriptsDir = filename:join(
1283-
[SecDepsDir,
1284-
SrcDir,
1285-
"sbin"]),
1286-
SecOldScriptsDir = filename:join(
1287-
[SecDepsDir,
1288-
"rabbit",
1289-
"scripts"]),
1290-
SecNewScriptsDirExists = filelib:is_dir(
1291-
SecNewScriptsDir),
1292-
SecScriptsDir =
1293-
case SecNewScriptsDirExists of
1294-
true -> SecNewScriptsDir;
1295-
false -> SecOldScriptsDir
1296-
end,
1282+
SrcDir = case WithPlugins of
1283+
false ->
1284+
?config(
1285+
secondary_rabbit_srcdir,
1286+
Config);
1287+
_ ->
1288+
?config(
1289+
secondary_current_srcdir,
1290+
Config)
1291+
end,
1292+
SecScriptsDir = filename:join(
1293+
[SrcDir, "sbin"]),
12971294
rabbit_misc:format(
12981295
"~ts/rabbitmqctl", [SecScriptsDir]);
12991296
_ ->

0 commit comments

Comments
 (0)