Ensure that the restart policy is unless-stopped
No other restart policy makes sense to don't let it be changed. Fixes: https://github.com/basecamp/kamal/issues/749
This commit is contained in:
@@ -187,4 +187,12 @@ class ConfigurationAccessoryTest < ActiveSupport::TestCase
|
||||
assert @config.accessory(:monitoring).running_proxy?
|
||||
assert_equal [ "monitoring.example.com" ], @config.accessory(:monitoring).proxy.hosts
|
||||
end
|
||||
|
||||
test "can't set restart in options" do
|
||||
@deploy[:accessories]["mysql"]["options"] = { "restart" => "always" }
|
||||
|
||||
assert_raises Kamal::ConfigurationError, "servers/workers: Cannot set restart policy in docker options, unless-stopped is required" do
|
||||
Kamal::Configuration.new(@deploy)
|
||||
end
|
||||
end
|
||||
end
|
||||
|
||||
Reference in New Issue
Block a user