diff --git a/lib/mrsk/commands/healthcheck.rb b/lib/mrsk/commands/healthcheck.rb index d4fba27a..ba952d15 100644 --- a/lib/mrsk/commands/healthcheck.rb +++ b/lib/mrsk/commands/healthcheck.rb @@ -12,6 +12,7 @@ class Mrsk::Commands::Healthcheck < Mrsk::Commands::Base "-e", "MRSK_CONTAINER_NAME=\"#{container_name}\"", *web.env_args, *config.volume_args, + *web.option_args, config.absolute_image, web.cmd end diff --git a/test/commands/healthcheck_test.rb b/test/commands/healthcheck_test.rb index 54cb4362..cd1f0d2d 100644 --- a/test/commands/healthcheck_test.rb +++ b/test/commands/healthcheck_test.rb @@ -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",