|
53 | 53 | get_connection_pids/1,
|
54 | 54 | get_queue_sup_pid/1,
|
55 | 55 |
|
56 |
| - set_parameter/5, |
57 |
| - clear_parameter/4, |
58 |
| - |
59 | 56 | set_policy/6,
|
60 | 57 | clear_policy/3,
|
61 | 58 | set_ha_policy/4, set_ha_policy/5,
|
62 | 59 | set_ha_policy_all/1,
|
63 | 60 | set_ha_policy_two_pos/1,
|
64 | 61 | set_ha_policy_two_pos_batch_sync/1,
|
65 | 62 |
|
| 63 | + set_parameter/5, |
| 64 | + clear_parameter/4, |
| 65 | + |
| 66 | + enable_plugin/3, |
| 67 | + disable_plugin/3, |
| 68 | + |
66 | 69 | test_channel/0
|
67 | 70 | ]).
|
68 | 71 |
|
@@ -786,22 +789,6 @@ get_queue_sup_pid([{_, SupPid, _, _} | Rest], QueuePid) ->
|
786 | 789 | get_queue_sup_pid([], _QueuePid) ->
|
787 | 790 | undefined.
|
788 | 791 |
|
789 |
| - |
790 |
| -%% ------------------------------------------------------------------- |
791 |
| -%% Runtime parameter helpers. |
792 |
| -%% ------------------------------------------------------------------- |
793 |
| - |
794 |
| -set_parameter(Config, Node, Component, Key, Value) -> |
795 |
| - ok = rpc(Config, Node, |
796 |
| - rabbit_runtime_parameters, parse_set, |
797 |
| - [<<"/">>, Component, Key, Value, none]). |
798 |
| - |
799 |
| -clear_parameter(Config, Node, Component, Key) -> |
800 |
| - ok = rpc(Config, Node, |
801 |
| - rabbit_runtime_parameters, clear, |
802 |
| - [<<"/">>, Component, Key]). |
803 |
| - |
804 |
| - |
805 | 792 | %% -------------------------------------------------------------------
|
806 | 793 | %% Policy helpers.
|
807 | 794 | %% -------------------------------------------------------------------
|
@@ -854,6 +841,39 @@ set_ha_policy_two_pos_batch_sync(Config) ->
|
854 | 841 | {<<"ha-promote-on-shutdown">>, <<"always">>}]),
|
855 | 842 | Config.
|
856 | 843 |
|
| 844 | +%% ------------------------------------------------------------------- |
| 845 | +%% Parameter helpers. |
| 846 | +%% ------------------------------------------------------------------- |
| 847 | + |
| 848 | +set_parameter(Config, Node, Component, Name, Value) -> |
| 849 | + ok = rpc(Config, Node, |
| 850 | + rabbit_runtime_parameters, set, [<<"/">>, Component, Name, Value, none]). |
| 851 | + |
| 852 | +clear_parameter(Config, Node, Component, Name) -> |
| 853 | + ok = rpc(Config, Node, |
| 854 | + rabbit_runtime_parameters, clear, [<<"/">>, Component, Name]). |
| 855 | + |
| 856 | +%% ------------------------------------------------------------------- |
| 857 | +%% Parameter helpers. |
| 858 | +%% ------------------------------------------------------------------- |
| 859 | + |
| 860 | +enable_plugin(Config, Node, Plugin) -> |
| 861 | + plugin_action(Config, Node, enable, [Plugin], []). |
| 862 | + |
| 863 | +disable_plugin(Config, Node, Plugin) -> |
| 864 | + plugin_action(Config, Node, disable, [Plugin], []). |
| 865 | + |
| 866 | +plugin_action(Config, Node, Command, Args, Opts) -> |
| 867 | + PluginsFile = rabbit_ct_broker_helpers:get_node_config(Config, Node, |
| 868 | + enabled_plugins_file), |
| 869 | + PluginsDir = rabbit_ct_broker_helpers:get_node_config(Config, Node, |
| 870 | + plugins_dir), |
| 871 | + Nodename = rabbit_ct_broker_helpers:get_node_config(Config, Node, |
| 872 | + nodename), |
| 873 | + rabbit_ct_broker_helpers:rpc(Config, Node, |
| 874 | + rabbit_plugins_main, action, |
| 875 | + [Command, Nodename, Args, Opts, PluginsFile, PluginsDir]). |
| 876 | + |
857 | 877 | %% -------------------------------------------------------------------
|
858 | 878 |
|
859 | 879 | test_channel() ->
|
|
0 commit comments