Fix volume args

This commit is contained in:
David Heinemeier Hansson
2023-01-22 21:58:30 +01:00
parent 25fb08791a
commit c69d6e1569
3 changed files with 6 additions and 6 deletions

View File

@@ -135,7 +135,7 @@ class ConfigurationTest < ActiveSupport::TestCase
end
test "volume_args" do
assert_equal ["--volume /local/path:/container/path"], @config.volume_args
assert_equal ["--volume", "/local/path:/container/path"], @config.volume_args
end
test "erb evaluation of yml config" do
@@ -162,6 +162,6 @@ class ConfigurationTest < ActiveSupport::TestCase
end
test "to_h" do
assert_equal({ :roles=>["web"], :hosts=>["1.1.1.1", "1.1.1.2"], :primary_host=>"1.1.1.1", :version=>"missing", :repository=>"dhh/app", :absolute_image=>"dhh/app:missing", :service_with_version=>"app-missing", :env_args=>["-e", "REDIS_URL=redis://x/y"], :ssh_options=>{:user=>"root", :auth_methods=>["publickey"]}, :volume_args=>["--volume /local/path:/container/path"] }, @config.to_h)
assert_equal({ :roles=>["web"], :hosts=>["1.1.1.1", "1.1.1.2"], :primary_host=>"1.1.1.1", :version=>"missing", :repository=>"dhh/app", :absolute_image=>"dhh/app:missing", :service_with_version=>"app-missing", :env_args=>["-e", "REDIS_URL=redis://x/y"], :ssh_options=>{:user=>"root", :auth_methods=>["publickey"]}, :volume_args=>["--volume", "/local/path:/container/path"] }, @config.to_h)
end
end