summaryrefslogtreecommitdiff
path: root/deps/rabbitmq_cli/test/plugins
diff options
context:
space:
mode:
authorMichael Klishin <michael@clojurewerkz.org>2016-09-07 18:22:23 +0300
committerMichael Klishin <michael@clojurewerkz.org>2016-09-07 18:22:24 +0300
commit639a38a89c7004d91bbbece4a47428cd26162e3d (patch)
tree3664b46ff46991083ba50b613c42c5b166c1d371 /deps/rabbitmq_cli/test/plugins
parentccd1533a7811c50afcf19ae9c60db7364eba02f1 (diff)
downloadrabbitmq-server-git-639a38a89c7004d91bbbece4a47428cd26162e3d.tar.gz
Use rabbitmq_stomp instead of rabbitmq_metronome
The metronome plugin is an example and not supposed to be used in production. It has certain assumptions that do not necessarily hold when a test suite that messes with broker state is executed. It therefore makes more sense to use rabbitmq_stomp or another plugin that is commonly deployed in production systems. Per discussion with @hairyhum.
Diffstat (limited to 'deps/rabbitmq_cli/test/plugins')
-rw-r--r--deps/rabbitmq_cli/test/plugins/disable_plugins_command_test.exs26
-rw-r--r--deps/rabbitmq_cli/test/plugins/enable_plugins_command_test.exs54
-rw-r--r--deps/rabbitmq_cli/test/plugins/list_plugins_command_test.exs34
-rw-r--r--deps/rabbitmq_cli/test/plugins/set_plugins_command_test.exs40
4 files changed, 79 insertions, 75 deletions
diff --git a/deps/rabbitmq_cli/test/plugins/disable_plugins_command_test.exs b/deps/rabbitmq_cli/test/plugins/disable_plugins_command_test.exs
index e8a527c4ae..dd45a196ec 100644
--- a/deps/rabbitmq_cli/test/plugins/disable_plugins_command_test.exs
+++ b/deps/rabbitmq_cli/test/plugins/disable_plugins_command_test.exs
@@ -56,7 +56,7 @@ defmodule DisablePluginsCommandTest do
RabbitMQ.CLI.Distribution.start()
:net_kernel.connect_node(get_rabbit_hostname)
set_enabled_plugins(get_rabbit_hostname,
- [:rabbitmq_metronome, :rabbitmq_federation],
+ [:rabbitmq_stomp, :rabbitmq_federation],
context[:opts])
on_exit([], fn ->
@@ -114,35 +114,35 @@ defmodule DisablePluginsCommandTest do
test "node is unaccessible, writes out enabled plugins file and returns implicitly enabled plugin list", context do
assert %{mode: :offline, enabled: [:amqp_client, :rabbitmq_federation]} ==
- @command.run(["rabbitmq_metronome"], Map.merge(context[:opts], %{node: :nonode}))
+ @command.run(["rabbitmq_stomp"], Map.merge(context[:opts], %{node: :nonode}))
assert {:ok, [[:rabbitmq_federation]]} == :file.consult(context[:opts][:enabled_plugins_file])
- assert [:amqp_client, :rabbitmq_federation, :rabbitmq_metronome] ==
+ assert [:amqp_client, :rabbitmq_federation, :rabbitmq_stomp] ==
Enum.sort(:rabbit_misc.rpc_call(context[:opts][:node], :rabbit_plugins, :active, []))
end
test "in offline mode, writes out enabled plugins and reports implicitly enabled plugin list", context do
assert %{mode: :offline, enabled: [:amqp_client, :rabbitmq_federation]} ==
- @command.run(["rabbitmq_metronome"], Map.merge(context[:opts], %{offline: true, online: false}))
+ @command.run(["rabbitmq_stomp"], Map.merge(context[:opts], %{offline: true, online: false}))
assert {:ok, [[:rabbitmq_federation]]} == :file.consult(context[:opts][:enabled_plugins_file])
- assert [:amqp_client, :rabbitmq_federation, :rabbitmq_metronome] ==
+ assert [:amqp_client, :rabbitmq_federation, :rabbitmq_stomp] ==
Enum.sort(:rabbit_misc.rpc_call(context[:opts][:node], :rabbit_plugins, :active, []))
end
test "in offline mode , removes implicitly enabled plugins when last explicitly enabled one is removed", context do
- assert %{mode: :offline, enabled: [:amqp_client, :rabbitmq_metronome]} ==
+ assert %{mode: :offline, enabled: [:amqp_client, :rabbitmq_stomp]} ==
@command.run(["rabbitmq_federation"], Map.merge(context[:opts], %{offline: true, online: false}))
- assert {:ok, [[:rabbitmq_metronome]]} == :file.consult(context[:opts][:enabled_plugins_file])
+ assert {:ok, [[:rabbitmq_stomp]]} == :file.consult(context[:opts][:enabled_plugins_file])
assert %{mode: :offline, enabled: []} ==
- @command.run(["rabbitmq_metronome"], Map.merge(context[:opts], %{offline: true, online: false}))
+ @command.run(["rabbitmq_stomp"], Map.merge(context[:opts], %{offline: true, online: false}))
assert {:ok, [[]]} = :file.consult(context[:opts][:enabled_plugins_file])
end
test "updates plugin list and stops disabled plugins", context do
assert %{mode: :online,
- started: [], stopped: [:rabbitmq_metronome],
+ started: [], stopped: [:rabbitmq_stomp],
enabled: [:amqp_client, :rabbitmq_federation]} ==
- @command.run(["rabbitmq_metronome"], context[:opts])
+ @command.run(["rabbitmq_stomp"], context[:opts])
assert {:ok, [[:rabbitmq_federation]]} == :file.consult(context[:opts][:enabled_plugins_file])
assert [:amqp_client, :rabbitmq_federation] ==
Enum.sort(:rabbit_misc.rpc_call(context[:opts][:node], :rabbit_plugins, :active, []))
@@ -157,16 +157,16 @@ defmodule DisablePluginsCommandTest do
test "can disable multiple plugins at once", context do
assert %{mode: :online,
- started: [], stopped: [:amqp_client, :rabbitmq_federation, :rabbitmq_metronome],
+ started: [], stopped: [:amqp_client, :rabbitmq_federation, :rabbitmq_stomp],
enabled: []} ==
- @command.run(["rabbitmq_metronome", "rabbitmq_federation"], context[:opts])
+ @command.run(["rabbitmq_stomp", "rabbitmq_federation"], context[:opts])
assert {:ok, [[]]} == :file.consult(context[:opts][:enabled_plugins_file])
assert Enum.empty?(Enum.sort(:rabbit_misc.rpc_call(context[:opts][:node], :rabbit_plugins, :active, [])))
end
test "disabling a dependency disables all plugins that depend on it", context do
assert %{mode: :online,
- started: [], stopped: [:amqp_client, :rabbitmq_federation, :rabbitmq_metronome],
+ started: [], stopped: [:amqp_client, :rabbitmq_federation, :rabbitmq_stomp],
enabled: []} ==
@command.run(["amqp_client"], context[:opts])
assert {:ok, [[]]} == :file.consult(context[:opts][:enabled_plugins_file])
diff --git a/deps/rabbitmq_cli/test/plugins/enable_plugins_command_test.exs b/deps/rabbitmq_cli/test/plugins/enable_plugins_command_test.exs
index 3ddb97e460..7c21a76faf 100644
--- a/deps/rabbitmq_cli/test/plugins/enable_plugins_command_test.exs
+++ b/deps/rabbitmq_cli/test/plugins/enable_plugins_command_test.exs
@@ -58,7 +58,7 @@ defmodule EnablePluginsCommandTest do
RabbitMQ.CLI.Distribution.start()
:net_kernel.connect_node(get_rabbit_hostname)
set_enabled_plugins(get_rabbit_hostname,
- [:rabbitmq_metronome, :rabbitmq_federation],
+ [:rabbitmq_stomp, :rabbitmq_federation],
context[:opts])
on_exit([], fn ->
@@ -118,10 +118,10 @@ defmodule EnablePluginsCommandTest do
# Clears enabled plugins file
PluginHelpers.set_enabled_plugins([], :offline, :nonode, context[:opts])
- assert %{mode: :offline, enabled: [:amqp_client, :rabbitmq_metronome]} ==
- @command.run(["rabbitmq_metronome"], Map.merge(context[:opts], %{node: :nonode}))
- assert {:ok, [[:rabbitmq_metronome]]} == :file.consult(context[:opts][:enabled_plugins_file])
- assert [:amqp_client, :rabbitmq_federation, :rabbitmq_metronome] ==
+ assert %{mode: :offline, enabled: [:amqp_client, :rabbitmq_stomp]} ==
+ @command.run(["rabbitmq_stomp"], Map.merge(context[:opts], %{node: :nonode}))
+ assert {:ok, [[:rabbitmq_stomp]]} == :file.consult(context[:opts][:enabled_plugins_file])
+ assert [:amqp_client, :rabbitmq_federation, :rabbitmq_stomp] ==
currently_active_plugins(context)
end
@@ -129,12 +129,12 @@ defmodule EnablePluginsCommandTest do
# Clears enabled plugins file
PluginHelpers.set_enabled_plugins([], :offline, :nonode, context[:opts])
- assert %{mode: :offline, enabled: [:amqp_client, :rabbitmq_metronome]} ==
- @command.run(["rabbitmq_metronome"], Map.merge(context[:opts], %{offline: true, online: false}))
- assert {:ok, [[:rabbitmq_metronome]]} == :file.consult(context[:opts][:enabled_plugins_file])
+ assert %{mode: :offline, enabled: [:amqp_client, :rabbitmq_stomp]} ==
+ @command.run(["rabbitmq_stomp"], Map.merge(context[:opts], %{offline: true, online: false}))
+ assert {:ok, [[:rabbitmq_stomp]]} == :file.consult(context[:opts][:enabled_plugins_file])
assert_equal_sets(
- [:amqp_client, :rabbitmq_federation, :rabbitmq_metronome],
+ [:amqp_client, :rabbitmq_federation, :rabbitmq_stomp],
currently_active_plugins(context))
end
@@ -142,15 +142,15 @@ defmodule EnablePluginsCommandTest do
# Clears enabled plugins file
PluginHelpers.set_enabled_plugins([], :offline, :nonode, context[:opts])
- assert %{mode: :offline, enabled: [:amqp_client, :rabbitmq_metronome]} ==
- @command.run(["rabbitmq_metronome"], Map.merge(context[:opts], %{offline: true, online: false}))
- assert {:ok, [[:rabbitmq_metronome]]} == :file.consult(context[:opts][:enabled_plugins_file])
+ assert %{mode: :offline, enabled: [:amqp_client, :rabbitmq_stomp]} ==
+ @command.run(["rabbitmq_stomp"], Map.merge(context[:opts], %{offline: true, online: false}))
+ assert {:ok, [[:rabbitmq_stomp]]} == :file.consult(context[:opts][:enabled_plugins_file])
- assert %{mode: :offline, enabled: [:amqp_client, :rabbitmq_federation, :rabbitmq_metronome]} ==
+ assert %{mode: :offline, enabled: [:amqp_client, :rabbitmq_federation, :rabbitmq_stomp]} ==
@command.run(["rabbitmq_federation"], Map.merge(context[:opts], %{offline: true, online: false}))
{:ok, [xs]} = :file.consult(context[:opts][:enabled_plugins_file])
- assert_equal_sets([:rabbitmq_metronome, :rabbitmq_federation], xs)
+ assert_equal_sets([:rabbitmq_stomp, :rabbitmq_federation], xs)
end
test "updates plugin list and starts newly enabled plugins", context do
@@ -158,22 +158,22 @@ defmodule EnablePluginsCommandTest do
PluginHelpers.set_enabled_plugins([], :online, context[:opts][:node], context[:opts])
assert %{mode: :online,
- started: [:amqp_client, :rabbitmq_metronome], stopped: [],
- enabled: [:amqp_client, :rabbitmq_metronome]} ==
- @command.run(["rabbitmq_metronome"], context[:opts])
+ started: [:amqp_client, :rabbitmq_stomp], stopped: [],
+ enabled: [:amqp_client, :rabbitmq_stomp]} ==
+ @command.run(["rabbitmq_stomp"], context[:opts])
assert {:ok, [xs]} = :file.consult(context[:opts][:enabled_plugins_file])
- assert_equal_sets([:rabbitmq_metronome], xs)
- assert_equal_sets([:amqp_client, :rabbitmq_metronome], currently_active_plugins(context))
+ assert_equal_sets([:rabbitmq_stomp], xs)
+ assert_equal_sets([:amqp_client, :rabbitmq_stomp], currently_active_plugins(context))
assert %{mode: :online,
started: [:rabbitmq_federation], stopped: [],
- enabled: [:amqp_client, :rabbitmq_federation, :rabbitmq_metronome]} ==
+ enabled: [:amqp_client, :rabbitmq_federation, :rabbitmq_stomp]} ==
@command.run(["rabbitmq_federation"], context[:opts])
assert {:ok, [xs]} = :file.consult(context[:opts][:enabled_plugins_file])
- assert_equal_sets([:rabbitmq_metronome, :rabbitmq_federation], xs)
- assert_equal_sets([:amqp_client, :rabbitmq_federation, :rabbitmq_metronome], currently_active_plugins(context))
+ assert_equal_sets([:rabbitmq_stomp, :rabbitmq_federation], xs)
+ assert_equal_sets([:amqp_client, :rabbitmq_federation, :rabbitmq_stomp], currently_active_plugins(context))
end
test "can enable multiple plugins at once", context do
@@ -181,13 +181,13 @@ defmodule EnablePluginsCommandTest do
PluginHelpers.set_enabled_plugins([], :online, context[:opts][:node], context[:opts])
assert %{mode: :online,
- started: [:amqp_client, :rabbitmq_federation, :rabbitmq_metronome], stopped: [],
- enabled: [:amqp_client, :rabbitmq_federation, :rabbitmq_metronome]} ==
- @command.run(["rabbitmq_metronome", "rabbitmq_federation"], context[:opts])
+ started: [:amqp_client, :rabbitmq_federation, :rabbitmq_stomp], stopped: [],
+ enabled: [:amqp_client, :rabbitmq_federation, :rabbitmq_stomp]} ==
+ @command.run(["rabbitmq_stomp", "rabbitmq_federation"], context[:opts])
assert {:ok, [xs]} = :file.consult(context[:opts][:enabled_plugins_file])
- assert_equal_sets([:rabbitmq_metronome, :rabbitmq_federation], xs)
- assert_equal_sets([:amqp_client, :rabbitmq_federation, :rabbitmq_metronome], currently_active_plugins(context))
+ assert_equal_sets([:rabbitmq_stomp, :rabbitmq_federation], xs)
+ assert_equal_sets([:amqp_client, :rabbitmq_federation, :rabbitmq_stomp], currently_active_plugins(context))
end
test "does not enable an already implicitly enabled plugin", context do
diff --git a/deps/rabbitmq_cli/test/plugins/list_plugins_command_test.exs b/deps/rabbitmq_cli/test/plugins/list_plugins_command_test.exs
index c6f0b2090a..2b6ae0ec2e 100644
--- a/deps/rabbitmq_cli/test/plugins/list_plugins_command_test.exs
+++ b/deps/rabbitmq_cli/test/plugins/list_plugins_command_test.exs
@@ -60,7 +60,7 @@ defmodule ListPluginsCommandTest do
RabbitMQ.CLI.Distribution.start()
:net_kernel.connect_node(get_rabbit_hostname)
set_enabled_plugins(get_rabbit_hostname,
- [:rabbitmq_metronome, :rabbitmq_federation],
+ [:rabbitmq_stomp, :rabbitmq_federation],
context[:opts])
on_exit([], fn ->
@@ -116,27 +116,27 @@ defmodule ListPluginsCommandTest do
test "will report list of plugins from file for stopped node", context do
node = context[:opts][:node]
- :ok = :rabbit_misc.rpc_call(node, :application, :stop, [:rabbitmq_metronome])
+ :ok = :rabbit_misc.rpc_call(node, :application, :stop, [:rabbitmq_stomp])
on_exit(fn ->
- :rabbit_misc.rpc_call(node, :application, :start, [:rabbitmq_metronome])
+ :rabbit_misc.rpc_call(node, :application, :start, [:rabbitmq_stomp])
end)
assert %{status: :node_down,
plugins: [%{name: :amqp_client, enabled: :implicit, running: false},
%{name: :rabbitmq_federation, enabled: :enabled, running: false},
- %{name: :rabbitmq_metronome, enabled: :enabled, running: false}]} =
+ %{name: :rabbitmq_stomp, enabled: :enabled, running: false}]} =
@command.run([".*"], Map.merge(context[:opts], %{node: :nonode}))
end
test "will report list of started plugins for started node", context do
node = context[:opts][:node]
- :ok = :rabbit_misc.rpc_call(node, :application, :stop, [:rabbitmq_metronome])
+ :ok = :rabbit_misc.rpc_call(node, :application, :stop, [:rabbitmq_stomp])
on_exit(fn ->
- :rabbit_misc.rpc_call(node, :application, :start, [:rabbitmq_metronome])
+ :rabbit_misc.rpc_call(node, :application, :start, [:rabbitmq_stomp])
end)
assert %{status: :running,
plugins: [%{name: :amqp_client, enabled: :implicit, running: true},
%{name: :rabbitmq_federation, enabled: :enabled, running: true},
- %{name: :rabbitmq_metronome, enabled: :enabled, running: false}]} =
+ %{name: :rabbitmq_stomp, enabled: :enabled, running: false}]} =
@command.run([".*"], context[:opts])
end
@@ -144,13 +144,13 @@ defmodule ListPluginsCommandTest do
assert %{status: :running,
plugins: [%{name: :amqp_client, enabled: :implicit, running: true, description: _, dependencies: []},
%{name: :rabbitmq_federation, enabled: :enabled, running: true, description: _, dependencies: [:amqp_client]},
- %{name: :rabbitmq_metronome, enabled: :enabled, running: true, description: _, dependencies: [:amqp_client]}]} =
+ %{name: :rabbitmq_stomp, enabled: :enabled, running: true, description: _, dependencies: [:amqp_client]}]} =
@command.run([".*"], Map.merge(context[:opts], %{verbose: true}))
end
test "will report plugin names in minimal mode", context do
assert %{status: :running,
- plugins: [:amqp_client, :rabbitmq_federation, :rabbitmq_metronome]} =
+ plugins: [:amqp_client, :rabbitmq_federation, :rabbitmq_stomp]} =
@command.run([".*"], Map.merge(context[:opts], %{minimal: true}))
end
@@ -158,19 +158,19 @@ defmodule ListPluginsCommandTest do
test "by default lists all plugins", context do
set_enabled_plugins(context[:opts][:node], [:rabbitmq_federation], context[:opts])
on_exit(fn ->
- set_enabled_plugins(context[:opts][:node], [:rabbitmq_metronome, :rabbitmq_federation], context[:opts])
+ set_enabled_plugins(context[:opts][:node], [:rabbitmq_stomp, :rabbitmq_federation], context[:opts])
end)
assert %{status: :running,
plugins: [%{name: :amqp_client, enabled: :implicit, running: true},
%{name: :rabbitmq_federation, enabled: :enabled, running: true},
- %{name: :rabbitmq_metronome, enabled: :not_enabled, running: false}]} =
+ %{name: :rabbitmq_stomp, enabled: :not_enabled, running: false}]} =
@command.run([".*"], context[:opts])
end
test "with enabled flag lists only explicitly enabled plugins", context do
set_enabled_plugins(context[:opts][:node], [:rabbitmq_federation], context[:opts])
on_exit(fn ->
- set_enabled_plugins(context[:opts][:node], [:rabbitmq_metronome, :rabbitmq_federation], context[:opts])
+ set_enabled_plugins(context[:opts][:node], [:rabbitmq_stomp, :rabbitmq_federation], context[:opts])
end)
assert %{status: :running,
plugins: [%{name: :rabbitmq_federation, enabled: :enabled, running: true}]} =
@@ -180,7 +180,7 @@ defmodule ListPluginsCommandTest do
test "with implicitly_enabled flag lists explicitly and implicitly enabled plugins", context do
set_enabled_plugins(context[:opts][:node], [:rabbitmq_federation], context[:opts])
on_exit(fn ->
- set_enabled_plugins(context[:opts][:node], [:rabbitmq_metronome, :rabbitmq_federation], context[:opts])
+ set_enabled_plugins(context[:opts][:node], [:rabbitmq_stomp, :rabbitmq_federation], context[:opts])
end)
assert %{status: :running,
plugins: [%{name: :amqp_client, enabled: :implicit, running: true},
@@ -189,6 +189,10 @@ defmodule ListPluginsCommandTest do
end
test "will filter plugins by name with pattern provided", context do
+ set_enabled_plugins(context[:opts][:node], [:rabbitmq_federation], context[:opts])
+ on_exit(fn ->
+ set_enabled_plugins(context[:opts][:node], [:rabbitmq_stomp, :rabbitmq_federation], context[:opts])
+ end)
assert %{status: :running,
plugins: [:rabbitmq_federation]} =
@command.run(["fede"], Map.merge(context[:opts], %{minimal: true}))
@@ -196,8 +200,8 @@ defmodule ListPluginsCommandTest do
plugins: [:amqp_client]} =
@command.run(["^[a-z]mq"], Map.merge(context[:opts], %{minimal: true}))
assert %{status: :running,
- plugins: [:rabbitmq_metronome]} =
- @command.run(["e$"], Map.merge(context[:opts], %{minimal: true}))
+ plugins: [:rabbitmq_stomp]} =
+ @command.run(["stomp$"], Map.merge(context[:opts], %{minimal: true}))
end
end
diff --git a/deps/rabbitmq_cli/test/plugins/set_plugins_command_test.exs b/deps/rabbitmq_cli/test/plugins/set_plugins_command_test.exs
index 5b3e80a720..24de5a9826 100644
--- a/deps/rabbitmq_cli/test/plugins/set_plugins_command_test.exs
+++ b/deps/rabbitmq_cli/test/plugins/set_plugins_command_test.exs
@@ -59,7 +59,7 @@ defmodule SetPluginsCommandTest do
RabbitMQ.CLI.Distribution.start()
:net_kernel.connect_node(get_rabbit_hostname)
set_enabled_plugins(get_rabbit_hostname,
- [:rabbitmq_metronome, :rabbitmq_federation],
+ [:rabbitmq_stomp, :rabbitmq_federation],
context[:opts])
on_exit([], fn ->
@@ -109,32 +109,32 @@ defmodule SetPluginsCommandTest do
end
test "will write enabled plugins file if node is unaccessible and report implicitly enabled list", context do
- assert %{mode: :offline, enabled: [:amqp_client, :rabbitmq_metronome]} =
- @command.run(["rabbitmq_metronome"], Map.merge(context[:opts], %{node: :nonode}))
- assert {:ok, [[:rabbitmq_metronome]]} = :file.consult(context[:opts][:enabled_plugins_file])
- assert [:amqp_client, :rabbitmq_federation, :rabbitmq_metronome] =
+ assert %{mode: :offline, enabled: [:amqp_client, :rabbitmq_stomp]} =
+ @command.run(["rabbitmq_stomp"], Map.merge(context[:opts], %{node: :nonode}))
+ assert {:ok, [[:rabbitmq_stomp]]} = :file.consult(context[:opts][:enabled_plugins_file])
+ assert [:amqp_client, :rabbitmq_federation, :rabbitmq_stomp] =
Enum.sort(:rabbit_misc.rpc_call(context[:opts][:node], :rabbit_plugins, :active, []))
end
test "will write enabled plugins in offline mode and report implicitly enabled list", context do
- assert %{mode: :offline, enabled: [:amqp_client, :rabbitmq_metronome]} =
- @command.run(["rabbitmq_metronome"], Map.merge(context[:opts], %{offline: true, online: false}))
- assert {:ok, [[:rabbitmq_metronome]]} = :file.consult(context[:opts][:enabled_plugins_file])
- assert [:amqp_client, :rabbitmq_federation, :rabbitmq_metronome] =
+ assert %{mode: :offline, enabled: [:amqp_client, :rabbitmq_stomp]} =
+ @command.run(["rabbitmq_stomp"], Map.merge(context[:opts], %{offline: true, online: false}))
+ assert {:ok, [[:rabbitmq_stomp]]} = :file.consult(context[:opts][:enabled_plugins_file])
+ assert [:amqp_client, :rabbitmq_federation, :rabbitmq_stomp] =
Enum.sort(:rabbit_misc.rpc_call(context[:opts][:node], :rabbit_plugins, :active, []))
end
test "will update list of plugins and start/stop enabled/disabled plugins", context do
assert %{mode: :online,
started: [], stopped: [:rabbitmq_federation],
- enabled: [:amqp_client, :rabbitmq_metronome]} =
- @command.run(["rabbitmq_metronome"], context[:opts])
- assert {:ok, [[:rabbitmq_metronome]]} = :file.consult(context[:opts][:enabled_plugins_file])
- assert [:amqp_client, :rabbitmq_metronome] =
+ enabled: [:amqp_client, :rabbitmq_stomp]} =
+ @command.run(["rabbitmq_stomp"], context[:opts])
+ assert {:ok, [[:rabbitmq_stomp]]} = :file.consult(context[:opts][:enabled_plugins_file])
+ assert [:amqp_client, :rabbitmq_stomp] =
Enum.sort(:rabbit_misc.rpc_call(context[:opts][:node], :rabbit_plugins, :active, []))
assert %{mode: :online,
- started: [:rabbitmq_federation], stopped: [:rabbitmq_metronome],
+ started: [:rabbitmq_federation], stopped: [:rabbitmq_stomp],
enabled: [:amqp_client, :rabbitmq_federation]} =
@command.run(["rabbitmq_federation"], context[:opts])
assert {:ok, [[:rabbitmq_federation]]} = :file.consult(context[:opts][:enabled_plugins_file])
@@ -144,7 +144,7 @@ defmodule SetPluginsCommandTest do
test "can disable all plugins", context do
assert %{mode: :online,
- started: [], stopped: [:amqp_client, :rabbitmq_federation, :rabbitmq_metronome],
+ started: [], stopped: [:amqp_client, :rabbitmq_federation, :rabbitmq_stomp],
enabled: []} =
@command.run([], context[:opts])
assert {:ok, [[]]} = :file.consult(context[:opts][:enabled_plugins_file])
@@ -154,12 +154,12 @@ defmodule SetPluginsCommandTest do
test "can set multiple plugins", context do
set_enabled_plugins(get_rabbit_hostname,[],context[:opts])
assert %{mode: :online,
- started: [:amqp_client, :rabbitmq_federation, :rabbitmq_metronome], stopped: [],
- enabled: [:amqp_client, :rabbitmq_federation, :rabbitmq_metronome]} =
- @command.run(["rabbitmq_federation", "rabbitmq_metronome"], context[:opts])
- assert {:ok, [[:rabbitmq_federation, :rabbitmq_metronome]]} =
+ started: [:amqp_client, :rabbitmq_federation, :rabbitmq_stomp], stopped: [],
+ enabled: [:amqp_client, :rabbitmq_federation, :rabbitmq_stomp]} =
+ @command.run(["rabbitmq_federation", "rabbitmq_stomp"], context[:opts])
+ assert {:ok, [[:rabbitmq_federation, :rabbitmq_stomp]]} =
:file.consult(context[:opts][:enabled_plugins_file])
- assert [:amqp_client, :rabbitmq_federation, :rabbitmq_metronome] =
+ assert [:amqp_client, :rabbitmq_federation, :rabbitmq_stomp] =
Enum.sort(:rabbit_misc.rpc_call(context[:opts][:node], :rabbit_plugins, :active, []))
end