Merge pull request #444 from rience/custom-healthcheck-log-lines-count

Configurable Number of Lines in Healthcheck Log Output
This commit is contained in:
Donal McBreen
2023-09-13 08:57:00 +01:00
committed by GitHub
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] = { "log_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"