Configurable Lines Number in Healthcheck Log Output

This commit is contained in:
Krzysztof Adamski
2023-09-06 10:54:30 +02:00
parent 2962f545b9
commit 8ddc484ce6
5 changed files with 15 additions and 4 deletions

View File

@@ -92,6 +92,13 @@ class CommandsHealthcheckTest < ActiveSupport::TestCase
new_command.logs.join(" ")
end
test "logs with custom lines number" do
@config[:healthcheck] = { "lines" => 150 }
assert_equal \
"docker container ls --all --filter name=^healthcheck-app-123$ --quiet | xargs docker logs --tail 150 2>&1",
new_command.logs.join(" ")
end
test "logs with destination" do
@destination = "staging"