rabbit_log -> logger in CLI tests
This commit is contained in:
parent
2943baf7d4
commit
9ccb6dc447
|
|
@ -39,7 +39,6 @@ defmodule RabbitMQCtl.MixfileBase do
|
|||
:rabbit_event,
|
||||
:rabbit_file,
|
||||
:rabbit_net,
|
||||
:rabbit_log,
|
||||
:rabbit_misc,
|
||||
:rabbit_mnesia,
|
||||
:rabbit_nodes_common,
|
||||
|
|
|
|||
|
|
@ -56,7 +56,7 @@ defmodule LogLocationCommandTest do
|
|||
test "run: prints default log location", context do
|
||||
{:ok, logfile} = @command.run([], context[:opts])
|
||||
log_message = "file location"
|
||||
:rpc.call(get_rabbit_hostname(), :rabbit_log, :error, [to_charlist(log_message)])
|
||||
:rpc.call(get_rabbit_hostname(), :logger, :error, [to_charlist(log_message)])
|
||||
wait_for_log_message(log_message, logfile)
|
||||
{:ok, log_file_data} = File.read(logfile)
|
||||
assert String.match?(log_file_data, Regex.compile!(log_message))
|
||||
|
|
@ -67,12 +67,12 @@ defmodule LogLocationCommandTest do
|
|||
[logfile | _] = @command.run([], Map.merge(context[:opts], %{all: true}))
|
||||
|
||||
log_message = "checking the default log file when checking all"
|
||||
:rpc.call(get_rabbit_hostname(), :rabbit_log, :error, [to_charlist(log_message)])
|
||||
:rpc.call(get_rabbit_hostname(), :logger, :error, [to_charlist(log_message)])
|
||||
wait_for_log_message(log_message, logfile)
|
||||
|
||||
log_message_upgrade = "checking the upgrade log file when checking all"
|
||||
|
||||
:rpc.call(get_rabbit_hostname(), :rabbit_log, :log, [
|
||||
:rpc.call(get_rabbit_hostname(), :logger, :log, [
|
||||
:upgrade,
|
||||
:error,
|
||||
to_charlist(log_message_upgrade),
|
||||
|
|
|
|||
|
|
@ -61,7 +61,7 @@ defmodule LogTailCommandTest do
|
|||
:lists.seq(1, 50),
|
||||
fn n ->
|
||||
message = "Getting log tail #{n}"
|
||||
:rpc.call(get_rabbit_hostname(), :rabbit_log, :error, [to_charlist(message)])
|
||||
:rpc.call(get_rabbit_hostname(), :logger, :error, [to_charlist(message)])
|
||||
message
|
||||
end
|
||||
)
|
||||
|
|
@ -84,7 +84,7 @@ defmodule LogTailCommandTest do
|
|||
:lists.seq(1, 50),
|
||||
fn n ->
|
||||
message = "More lines #{n}"
|
||||
:rpc.call(get_rabbit_hostname(), :rabbit_log, :error, [to_charlist(message)])
|
||||
:rpc.call(get_rabbit_hostname(), :logger, :error, [to_charlist(message)])
|
||||
message
|
||||
end
|
||||
)
|
||||
|
|
@ -102,7 +102,7 @@ defmodule LogTailCommandTest do
|
|||
:lists.seq(1, 100),
|
||||
fn n ->
|
||||
message = "More lines #{n}"
|
||||
:rpc.call(get_rabbit_hostname(), :rabbit_log, :error, [to_charlist(message)])
|
||||
:rpc.call(get_rabbit_hostname(), :logger, :error, [to_charlist(message)])
|
||||
message
|
||||
end
|
||||
)
|
||||
|
|
|
|||
|
|
@ -58,10 +58,10 @@ defmodule LogTailStreamCommandTest do
|
|||
time_before = System.system_time(:second)
|
||||
|
||||
stream = @command.run([], Map.merge(context[:opts], %{duration: 15}))
|
||||
:rpc.call(get_rabbit_hostname(), :rabbit_log, :error, [to_charlist("Message")])
|
||||
:rpc.call(get_rabbit_hostname(), :rabbit_log, :error, [to_charlist("Message1")])
|
||||
:rpc.call(get_rabbit_hostname(), :rabbit_log, :error, [to_charlist("Message2")])
|
||||
:rpc.call(get_rabbit_hostname(), :rabbit_log, :error, [to_charlist("Message3")])
|
||||
:rpc.call(get_rabbit_hostname(), :logger, :error, [to_charlist("Message")])
|
||||
:rpc.call(get_rabbit_hostname(), :logger, :error, [to_charlist("Message1")])
|
||||
:rpc.call(get_rabbit_hostname(), :logger, :error, [to_charlist("Message2")])
|
||||
:rpc.call(get_rabbit_hostname(), :logger, :error, [to_charlist("Message3")])
|
||||
|
||||
# This may take a long time and fail with an ExUnit timeout
|
||||
data = Enum.join(stream)
|
||||
|
|
@ -99,7 +99,7 @@ defmodule LogTailStreamCommandTest do
|
|||
:ok
|
||||
|
||||
false ->
|
||||
:rpc.call(get_rabbit_hostname(), :rabbit_log, :error, [to_charlist("Ping")])
|
||||
:rpc.call(get_rabbit_hostname(), :logger, :error, [to_charlist("Ping")])
|
||||
:timer.sleep(100)
|
||||
ensure_file(log, attempts - 1)
|
||||
end
|
||||
|
|
|
|||
Loading…
Reference in New Issue