Merge pull request #102 from moomerman/cmd-options-for-healthcheck

Use custom web options for healthcheck
This commit is contained in:
David Heinemeier Hansson
2023-03-13 15:12:25 +01:00
committed by GitHub
2 changed files with 8 additions and 0 deletions

View File

@@ -30,6 +30,13 @@ class CommandsHealthcheckTest < ActiveSupport::TestCase
new_command.run.join(" ")
end
test "run with custom options" do
@config[:servers] = { "web" => { "hosts" => [ "1.1.1.1" ], "options" => { "mount" => "somewhere" } } }
assert_equal \
"docker run --detach --name healthcheck-app-123 --publish 3999:3000 --label service=healthcheck-app --mount \"somewhere\" dhh/app:123",
new_command.run.join(" ")
end
test "curl" do
assert_equal \
"curl --silent --output /dev/null --write-out '%{http_code}' --max-time 2 http://localhost:3999/up",