Skip to content

Commit

Permalink
Tests: set disk monitor as active in set_disk_free_limit_command_test
Browse files Browse the repository at this point in the history
  • Loading branch information
dcorbacho committed Nov 6, 2024
1 parent 6d5b36b commit d8c4417
Showing 1 changed file with 11 additions and 5 deletions.
16 changes: 11 additions & 5 deletions deps/rabbitmq_cli/test/ctl/set_disk_free_limit_command_test.exs
Original file line number Diff line number Diff line change
Expand Up @@ -26,6 +26,12 @@ defmodule SetDiskFreeLimitCommandTest do
# silences warnings
context[:tag]
on_exit([], fn -> set_disk_free_limit(@default_limit) end)
:rabbit_misc.rpc_call(
get_rabbit_hostname(),
:rabbit_disk_monitor,
:set_enabled,
[:true]
)

{:ok, opts: %{node: get_rabbit_hostname()}}
end
Expand Down Expand Up @@ -108,7 +114,7 @@ defmodule SetDiskFreeLimitCommandTest do
fn ->
status()[:disk_free_limit] === context[:limit]
end,
60000
30000
)

set_disk_free_limit(@default_limit)
Expand All @@ -123,7 +129,7 @@ defmodule SetDiskFreeLimitCommandTest do
fn ->
status()[:disk_free_limit] === round(context[:limit])
end,
60000
30000
)

set_disk_free_limit(@default_limit)
Expand All @@ -138,7 +144,7 @@ defmodule SetDiskFreeLimitCommandTest do
fn ->
status()[:disk_free_limit] === context[:limit] |> Float.floor() |> round
end,
60000
30000
)

set_disk_free_limit(@default_limit)
Expand All @@ -152,7 +158,7 @@ defmodule SetDiskFreeLimitCommandTest do
fn ->
status()[:disk_free_limit] === String.to_integer(context[:limit])
end,
60000
30000
)

set_disk_free_limit(@default_limit)
Expand All @@ -165,7 +171,7 @@ defmodule SetDiskFreeLimitCommandTest do
fn ->
status()[:disk_free_limit] === 2_000_000
end,
60000
30000
)

set_disk_free_limit(@default_limit)
Expand Down

0 comments on commit d8c4417

Please sign in to comment.