Rip out Traefik
This commit is contained in:
@@ -77,22 +77,22 @@ class ConfigurationTest < ActiveSupport::TestCase
|
||||
assert_equal "1.1.1.1", @config_with_roles.primary_host
|
||||
end
|
||||
|
||||
test "traefik hosts" do
|
||||
assert_equal [ "1.1.1.1", "1.1.1.2" ], @config_with_roles.traefik_hosts
|
||||
test "proxy hosts" do
|
||||
assert_equal [ "1.1.1.1", "1.1.1.2" ], @config_with_roles.proxy_hosts
|
||||
|
||||
@deploy_with_roles[:servers]["workers"]["traefik"] = true
|
||||
@deploy_with_roles[:servers]["workers"]["proxy"] = true
|
||||
config = Kamal::Configuration.new(@deploy_with_roles)
|
||||
|
||||
assert_equal [ "1.1.1.1", "1.1.1.2", "1.1.1.3" ], config.traefik_hosts
|
||||
assert_equal [ "1.1.1.1", "1.1.1.2", "1.1.1.3" ], config.proxy_hosts
|
||||
end
|
||||
|
||||
test "filtered traefik hosts" do
|
||||
assert_equal [ "1.1.1.1", "1.1.1.2" ], @config_with_roles.traefik_hosts
|
||||
test "filtered proxy hosts" do
|
||||
assert_equal [ "1.1.1.1", "1.1.1.2" ], @config_with_roles.proxy_hosts
|
||||
|
||||
@deploy_with_roles[:servers]["workers"]["traefik"] = true
|
||||
@deploy_with_roles[:servers]["workers"]["proxy"] = true
|
||||
config = Kamal::Configuration.new(@deploy_with_roles)
|
||||
|
||||
assert_equal [ "1.1.1.1", "1.1.1.2", "1.1.1.3" ], config.traefik_hosts
|
||||
assert_equal [ "1.1.1.1", "1.1.1.2", "1.1.1.3" ], config.proxy_hosts
|
||||
end
|
||||
|
||||
test "version no git repo" do
|
||||
@@ -157,10 +157,6 @@ class ConfigurationTest < ActiveSupport::TestCase
|
||||
assert_equal "app-missing", @config.service_with_version
|
||||
end
|
||||
|
||||
test "healthcheck service" do
|
||||
assert_equal "healthcheck-app", @config.healthcheck_service
|
||||
end
|
||||
|
||||
test "hosts required for all roles" do
|
||||
# Empty server list for implied web role
|
||||
assert_raises(Kamal::ConfigurationError) do
|
||||
@@ -269,8 +265,7 @@ class ConfigurationTest < ActiveSupport::TestCase
|
||||
sshkit: {},
|
||||
volume_args: [ "--volume", "/local/path:/container/path" ],
|
||||
builder: { "arch" => "amd64" },
|
||||
logging: [ "--log-opt", "max-size=\"10m\"" ],
|
||||
healthcheck: { "cmd"=>"curl -f http://localhost:3000/up || exit 1", "interval" => "1s", "path"=>"/up", "port"=>3000, "max_attempts" => 7, "cord" => "/tmp/kamal-cord", "log_lines" => 50 } }
|
||||
logging: [ "--log-opt", "max-size=\"10m\"" ] }
|
||||
|
||||
assert_equal expected_config, @config.to_h
|
||||
end
|
||||
@@ -322,7 +317,7 @@ class ConfigurationTest < ActiveSupport::TestCase
|
||||
assert_equal "alternate_web", config.primary_role.name
|
||||
assert_equal "1.1.1.4", config.primary_host
|
||||
assert config.role(:alternate_web).primary?
|
||||
assert config.role(:alternate_web).running_traefik?
|
||||
assert config.role(:alternate_web).running_proxy?
|
||||
end
|
||||
|
||||
test "primary role missing" do
|
||||
@@ -344,7 +339,7 @@ class ConfigurationTest < ActiveSupport::TestCase
|
||||
dest_config_file = Pathname.new(File.expand_path("fixtures/deploy_with_extensions.yml", __dir__))
|
||||
|
||||
config = Kamal::Configuration.create_from config_file: dest_config_file
|
||||
assert_equal config.role(:web_tokyo).running_traefik?, true
|
||||
assert_equal config.role(:web_chicago).running_traefik?, true
|
||||
assert_equal config.role(:web_tokyo).running_proxy?, true
|
||||
assert_equal config.role(:web_chicago).running_proxy?, true
|
||||
end
|
||||
end
|
||||
|
||||
Reference in New Issue
Block a user