Simplify domain language to just "boot" and unscoped config keys
This commit is contained in:
@@ -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
|
||||
|
||||
@@ -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
|
||||
|
||||
@@ -13,5 +13,5 @@ registry:
|
||||
password: pw
|
||||
|
||||
boot:
|
||||
group_limit: 3
|
||||
group_wait: 2
|
||||
limit: 3
|
||||
wait: 2
|
||||
@@ -13,5 +13,5 @@ registry:
|
||||
password: pw
|
||||
|
||||
boot:
|
||||
group_limit: 25%
|
||||
group_wait: 2
|
||||
limit: 25%
|
||||
wait: 2
|
||||
Reference in New Issue
Block a user