Reverted network arguments everywhere except to accessory config

This commit is contained in:
Igor Alexandrov
2024-10-09 10:00:49 +04:00
parent 08dacd2745
commit da2a543cbc
11 changed files with 3 additions and 69 deletions

View File

@@ -64,14 +64,6 @@ class CommandsAppTest < ActiveSupport::TestCase
new_command.run.join(" ")
end
test "run in custom network" do
@config[:network] = "custom"
assert_equal \
"docker run --detach --restart unless-stopped --name app-web-999 --network custom -e KAMAL_CONTAINER_NAME=\"app-web-999\" -e KAMAL_VERSION=\"999\" --env-file .kamal/apps/app/env/roles/web.env --log-opt max-size=\"10m\" --label service=\"app\" --label role=\"web\" --label destination dhh/app:999",
new_command.run.join(" ")
end
test "start" do
assert_equal \
"docker start app-web-999",

View File

@@ -27,14 +27,6 @@ class CommandsProxyTest < ActiveSupport::TestCase
new_command.run.join(" ")
end
test "run in custom network" do
@config[:network] = "custom"
assert_equal \
"docker run --name kamal-proxy --network custom --detach --restart unless-stopped --volume kamal-proxy-config:/home/kamal-proxy/.config/kamal-proxy $(cat .kamal/proxy/options || echo \"--publish 80:80 --publish 443:443\") basecamp/kamal-proxy:#{Kamal::Configuration::PROXY_MINIMUM_VERSION}",
new_command.run.join(" ")
end
test "proxy start" do
assert_equal \
"docker container start kamal-proxy",

View File

@@ -38,15 +38,6 @@ class ConfigurationProxyTest < ActiveSupport::TestCase
assert_not config.proxy.ssl?
end
test "network_args defaults" do
assert_equal [ "--network", "kamal" ], config.proxy.network_args
end
test "network_args with configured options" do
@deploy[:proxy] = { "network" => "example" }
assert_equal [ "--network", "example" ], config.proxy.network_args
end
private
def config
Kamal::Configuration.new(@deploy)

View File

@@ -217,15 +217,6 @@ class ConfigurationTest < ActiveSupport::TestCase
assert_equal [ "--log-driver", "\"local\"", "--log-opt", "max-size=\"100m\"", "--log-opt", "max-file=\"5\"" ], config.logging_args
end
test "network_args default" do
assert_equal [ "--network", "kamal" ], @config.network_args
end
test "network_args with configured options" do
config = Kamal::Configuration.new(@deploy.tap { |c| c.merge!(network: "custom") })
assert_equal [ "--network", "custom" ], config.network_args
end
test "erb evaluation of yml config" do
config = Kamal::Configuration.create_from config_file: Pathname.new(File.expand_path("fixtures/deploy.erb.yml", __dir__))
assert_equal "my-user", config.registry.username