Skip to content

Commit

Permalink
Merge pull request #12895 from rabbitmq/mergify/bp/v4.0.x/pr-12894
Browse files Browse the repository at this point in the history
  • Loading branch information
the-mikedavis authored Dec 4, 2024
2 parents 7a5eb3b + 7ca679d commit 2afb29f
Show file tree
Hide file tree
Showing 6 changed files with 5 additions and 7 deletions.
2 changes: 1 addition & 1 deletion deps/rabbitmq_cli/Makefile
Original file line number Diff line number Diff line change
Expand Up @@ -17,7 +17,7 @@ VERBOSE_TEST ?= true
MAX_CASES ?= 1

MIX_TEST_OPTS ?= ""
MIX_TEST = ERL_COMPILER_OPTIONS=deterministic mix test --max-cases=$(MAX_CASES)
MIX_TEST = ERL_COMPILER_OPTIONS=deterministic MIX_ENV=test mix do compile --warnings-as-errors, test --max-cases=$(MAX_CASES) --warnings-as-errors

ifneq ("",$(MIX_TEST_OPTS))
MIX_TEST := $(MIX_TEST) $(MIX_TEST_OPTS)
Expand Down
2 changes: 1 addition & 1 deletion deps/rabbitmq_cli/lib/rabbitmq/cli/auto_complete.ex
Original file line number Diff line number Diff line change
Expand Up @@ -94,7 +94,7 @@ defmodule RabbitMQ.CLI.AutoComplete do

defp complete_command_opts(command, <<"-", _::binary>> = opt) do
switches =
command.switches
command.switches()
|> Keyword.keys()
|> Enum.map(fn sw -> "--" <> to_string(sw) end)

Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -10,7 +10,6 @@ defmodule CheckIfAnyDeprecatedFeaturesAreUsedCommandTest do

@command RabbitMQ.CLI.Diagnostics.Commands.CheckIfAnyDeprecatedFeaturesAreUsedCommand
@policy_name "cmq-policy-8373"
@policy_value "{\"ha-mode\":\"all\"}"

setup_all do
RabbitMQ.CLI.Core.Distribution.start()
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -10,7 +10,6 @@ defmodule CheckIfClusterHasClassicQueueMirroringPolicyCommandTest do

@command RabbitMQ.CLI.Diagnostics.Commands.CheckIfClusterHasClassicQueueMirroringPolicyCommand
@policy_name "cmq-policy-8373"
@policy_value "{\"ha-mode\":\"all\"}"

setup_all do
RabbitMQ.CLI.Core.Distribution.start()
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -37,7 +37,7 @@ defmodule DiscoverPeersCommandTest do

@tag test_timeout: 15000
test "run: returns a list of nodes when the backend isn't configured", context do
this_node = node()
assert match?({:ok, {[this_node], _}}, @command.run([], context[:opts]))
this_node = context.opts.node
assert match?({:ok, {[^this_node], _}}, @command.run([], context[:opts]))
end
end
2 changes: 1 addition & 1 deletion deps/rabbitmq_cli/test/rabbitmqctl_test.exs
Original file line number Diff line number Diff line change
Expand Up @@ -121,7 +121,7 @@ defmodule RabbitMQCtlTest do

test "short node name without the host part connects properly" do
command = ["status", "-n", "rabbit"]
capture_io(:stderr, fn -> error_check(command, exit_ok()) end)
capture_io(:stdio, fn -> error_check(command, exit_ok()) end)
end

test "a non-existent command results in help message displayed" do
Expand Down

0 comments on commit 2afb29f

Please sign in to comment.