diff options
| author | Daniil Fedotov <dfedotov@pivotal.io> | 2017-04-05 13:01:40 +0100 |
|---|---|---|
| committer | Daniil Fedotov <dfedotov@pivotal.io> | 2017-04-05 13:02:27 +0100 |
| commit | 81ab2e77250073688175b6d058f15da02be4806a (patch) | |
| tree | 6c7776da4b15403a532fd0a5d3362a36dd44a7f8 /test | |
| parent | c8efc41ae880a1429daf0e4b1c36520ba383c1f4 (diff) | |
| download | rabbitmq-server-git-81ab2e77250073688175b6d058f15da02be4806a.tar.gz | |
Unused obsolete functions
Diffstat (limited to 'test')
| -rw-r--r-- | test/backing_queue_SUITE.erl | 91 |
1 files changed, 0 insertions, 91 deletions
diff --git a/test/backing_queue_SUITE.erl b/test/backing_queue_SUITE.erl index 6f760e9914..e17b2afbf3 100644 --- a/test/backing_queue_SUITE.erl +++ b/test/backing_queue_SUITE.erl @@ -1587,94 +1587,3 @@ check_variable_queue_status(VQ0, Props) -> S = variable_queue_status(VQ1), assert_props(S, Props), VQ1. - -%% --------------------------------------------------------------------------- -%% rabbitmqctl helpers. -%% --------------------------------------------------------------------------- - -control_action(Command, Args) -> - control_action(Command, node(), Args, default_options()). - -control_action(Command, Args, NewOpts) -> - control_action(Command, node(), Args, - expand_options(default_options(), NewOpts)). - -control_action(Command, Node, Args, Opts) -> - case catch rabbit_control_main:action( - Command, Node, Args, Opts, - fun (Format, Args1) -> - io:format(Format ++ " ...~n", Args1) - end) of - ok -> - io:format("done.~n"), - ok; - {ok, Result} -> - rabbit_control_misc:print_cmd_result(Command, Result), - ok; - Other -> - io:format("failed: ~p~n", [Other]), - Other - end. - -control_action_t(Command, Args, Timeout) when is_number(Timeout) -> - control_action_t(Command, node(), Args, default_options(), Timeout). - -control_action_t(Command, Args, NewOpts, Timeout) when is_number(Timeout) -> - control_action_t(Command, node(), Args, - expand_options(default_options(), NewOpts), - Timeout). - -control_action_t(Command, Node, Args, Opts, Timeout) when is_number(Timeout) -> - case catch rabbit_control_main:action( - Command, Node, Args, Opts, - fun (Format, Args1) -> - io:format(Format ++ " ...~n", Args1) - end, Timeout) of - ok -> - io:format("done.~n"), - ok; - {ok, Result} -> - rabbit_control_misc:print_cmd_result(Command, Result), - ok; - Other -> - io:format("failed: ~p~n", [Other]), - Other - end. - -control_action_opts(Raw) -> - NodeStr = atom_to_list(node()), - case rabbit_control_main:parse_arguments(Raw, NodeStr) of - {ok, {Cmd, Opts, Args}} -> - case control_action(Cmd, node(), Args, Opts) of - ok -> ok; - Error -> Error - end; - Error -> - Error - end. - -info_action(Command, Args, CheckVHost) -> - ok = control_action(Command, []), - if CheckVHost -> ok = control_action(Command, [], ["-p", "/"]); - true -> ok - end, - ok = control_action(Command, lists:map(fun atom_to_list/1, Args)), - {bad_argument, dummy} = control_action(Command, ["dummy"]), - ok. - -info_action_t(Command, Args, CheckVHost, Timeout) when is_number(Timeout) -> - if CheckVHost -> ok = control_action_t(Command, [], ["-p", "/"], Timeout); - true -> ok - end, - ok = control_action_t(Command, lists:map(fun atom_to_list/1, Args), Timeout), - ok. - -default_options() -> [{"-p", "/"}, {"-q", "false"}]. - -expand_options(As, Bs) -> - lists:foldl(fun({K, _}=A, R) -> - case proplists:is_defined(K, R) of - true -> R; - false -> [A | R] - end - end, Bs, As). |
