Run interactive commands with the correct host

Fixes https://github.com/basecamp/kamal/issues/430
This commit is contained in:
Donal McBreen
2023-09-18 11:56:44 +01:00
parent 6b0f93a564
commit 0861730e0e
4 changed files with 33 additions and 2 deletions

View File

@@ -49,6 +49,12 @@ class CommanderTest < ActiveSupport::TestCase
assert_equal "1.1.1.3", @kamal.primary_host
end
test "primary_role" do
assert_equal "web", @kamal.primary_role
@kamal.specific_roles = "workers"
assert_equal "workers", @kamal.primary_role
end
test "roles_on" do
assert_equal [ "web" ], @kamal.roles_on("1.1.1.1")
assert_equal [ "workers" ], @kamal.roles_on("1.1.1.3")