Simplify domain language to just "boot" and unscoped config keys

This commit is contained in:
David Heinemeier Hansson
2023-05-02 13:11:31 +02:00
parent f055766918
commit c83b74dcb7
8 changed files with 23 additions and 22 deletions

View File

@@ -40,7 +40,7 @@ class CliAppTest < CliTestCase
# Strategy is used when booting the containers
Mrsk::Cli::App.any_instance.expects(:on).with([ "1.1.1.1" ], in: :groups, limit: 3, wait: 2).with_block_given
run_command("boot", config: :with_group_strategy)
run_command("boot", config: :with_boot_strategy)
end
test "start" do

View File

@@ -55,19 +55,19 @@ class CommanderTest < ActiveSupport::TestCase
end
test "default group strategy" do
assert_empty @mrsk.group_strategy
assert_empty @mrsk.boot_strategy
end
test "specific limit group strategy" do
configure_with(:deploy_with_group_strategy)
configure_with(:deploy_with_boot_strategy)
assert_equal({ in: :groups, limit: 3, wait: 2 }, @mrsk.group_strategy)
assert_equal({ in: :groups, limit: 3, wait: 2 }, @mrsk.boot_strategy)
end
test "percentage-based group strategy" do
configure_with(:deploy_with_precentage_group_strategy)
configure_with(:deploy_with_precentage_boot_strategy)
assert_equal({ in: :groups, limit: 1, wait: 2 }, @mrsk.group_strategy)
assert_equal({ in: :groups, limit: 1, wait: 2 }, @mrsk.boot_strategy)
end
private

View File

@@ -13,5 +13,5 @@ registry:
password: pw
boot:
group_limit: 3
group_wait: 2
limit: 3
wait: 2

View File

@@ -13,5 +13,5 @@ registry:
password: pw
boot:
group_limit: 25%
group_wait: 2
limit: 25%
wait: 2