Skip to content

Commit 359b7e7

Browse files
committed
single validator in use and ensure test uses node count arg
1 parent 03dffc6 commit 359b7e7

File tree

2 files changed

+2
-7
lines changed

2 files changed

+2
-7
lines changed

deps/rabbitmq_cli/lib/rabbitmq/cli/queues/commands/grow_to_count_command.ex

Lines changed: 1 addition & 6 deletions
Original file line numberDiff line numberDiff line change
@@ -56,12 +56,7 @@ defmodule RabbitMQ.CLI.Queues.Commands.GrowToCountCommand do
5656
end
5757

5858
def validate_execution_environment(args, opts) do
59-
Validators.chain(
60-
[
61-
&Validators.rabbit_is_running/2
62-
],
63-
[args, opts]
64-
)
59+
Validators.rabbit_is_running(args, opts)
6560
end
6661

6762
def run([node_count, strategy], %{

deps/rabbitmq_cli/test/queues/grow_to_count_command_test.exs

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -78,7 +78,7 @@ defmodule RabbitMQ.CLI.Queues.Commands.GrowToCountCommandTest do
7878
end
7979

8080
test "validate: when wrong membership is provided, returns failure" do
81-
assert @command.validate(["quorum-queue-a", "all"], %{membership: "banana"}) ==
81+
assert @command.validate([7, "all"], %{membership: "banana"}) ==
8282
{:validation_failure, "voter status 'banana' is not recognised."}
8383
end
8484

0 commit comments

Comments
 (0)