Handle ssl: false in proxy config
Fixes: https://github.com/basecamp/kamal/issues/956
This commit is contained in:
@@ -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)
|
||||
|
||||
Reference in New Issue
Block a user