fix: allow configurations without web roles

This commit is contained in:
Yoel Cabo
2023-11-12 09:39:07 +01:00
parent 8f53104d00
commit 87cb8c1f71
7 changed files with 31 additions and 10 deletions

View File

@@ -64,9 +64,14 @@ class CliHealthcheckTest < CliTestCase
end
assert_match "container not ready (unhealthy)", exception.message
end
test "does not perform if primary does not have traefik" do
SSHKit::Backend::Abstract.any_instance.expects(:execute).never
run_command("perform", config_file: "test/fixtures/deploy_workers_only.yml")
end
private
def run_command(*command)
stdouted { Kamal::Cli::Healthcheck.start([*command, "-c", "test/fixtures/deploy_with_accessories.yml"]) }
def run_command(*command, config_file: "test/fixtures/deploy_with_accessories.yml")
stdouted { Kamal::Cli::Healthcheck.start([*command, "-c", config_file]) }
end
end