Handle ssl: false in proxy config

Fixes: https://github.com/basecamp/kamal/issues/956
This commit is contained in:
Donal McBreen
2024-09-26 06:17:40 -04:00
parent 7633fe0293
commit b3a6921118
2 changed files with 8 additions and 2 deletions

View File

@@ -1,6 +1,6 @@
require "test_helper"
class ConfigurationEnvTest < ActiveSupport::TestCase
class ConfigurationProxyTest < ActiveSupport::TestCase
setup do
@deploy = {
service: "app", image: "dhh/app", registry: { "username" => "dhh", "password" => "secret" },
@@ -18,6 +18,12 @@ class ConfigurationEnvTest < ActiveSupport::TestCase
assert_raises(Kamal::ConfigurationError) { config.proxy.ssl? }
end
test "ssl false" do
@deploy[:proxy] = { "ssl" => false }
assert_not config.proxy.ssl?
assert_not config.proxy.deploy_options.has_key?(:tls)
end
private
def config
Kamal::Configuration.new(@deploy)