Split lock and connection setup
Allow run the pre-connect hook before the first SSH command is executed, but only run the locking in `with_lock` blocks.
This commit is contained in:
@@ -92,6 +92,9 @@ class CliMainTest < CliTestCase
|
||||
test "deploy when locked" do
|
||||
Thread.report_on_exception = false
|
||||
|
||||
SSHKit::Backend::Abstract.any_instance.stubs(:execute)
|
||||
Dir.stubs(:chdir)
|
||||
|
||||
SSHKit::Backend::Abstract.any_instance.stubs(:execute)
|
||||
.with { |*args| args == [ :mkdir, "-p", ".kamal" ] }
|
||||
|
||||
@@ -113,6 +116,9 @@ class CliMainTest < CliTestCase
|
||||
test "deploy error when locking" do
|
||||
Thread.report_on_exception = false
|
||||
|
||||
SSHKit::Backend::Abstract.any_instance.stubs(:execute)
|
||||
Dir.stubs(:chdir)
|
||||
|
||||
SSHKit::Backend::Abstract.any_instance.stubs(:execute)
|
||||
.with { |*args| args == [ :mkdir, "-p", ".kamal" ] }
|
||||
|
||||
|
||||
Reference in New Issue
Block a user