mirror of
https://github.com/capistrano/capistrano
synced 2023-03-27 23:21:18 -04:00
Merge pull request #1555 from eric/logging-regression-for-run
Don't treat run() as a parallel task
This commit is contained in:
commit
ed370e7b08
2 changed files with 19 additions and 1 deletions
|
@ -320,7 +320,7 @@ module Capistrano
|
||||||
branches += server_branches
|
branches += server_branches
|
||||||
end
|
end
|
||||||
branches
|
branches
|
||||||
end
|
end.compact.uniq
|
||||||
end
|
end
|
||||||
|
|
||||||
end
|
end
|
||||||
|
|
|
@ -243,6 +243,12 @@ class ConfigurationActionsInvocationTest < Test::Unit::TestCase
|
||||||
|
|
||||||
def test_parallel_command_execution_with_matching_servers
|
def test_parallel_command_execution_with_matching_servers
|
||||||
@config.expects(:execute_on_servers)
|
@config.expects(:execute_on_servers)
|
||||||
|
|
||||||
|
logger = mock('logger')
|
||||||
|
logger.stubs(:debug).with("executing multiple commands in parallel").once
|
||||||
|
logger.stubs(:trace).twice
|
||||||
|
@config.stubs(:logger).returns(logger)
|
||||||
|
|
||||||
assert_block("should not raise Argument error") do
|
assert_block("should not raise Argument error") do
|
||||||
begin
|
begin
|
||||||
@config.servers = [:app, :db]
|
@config.servers = [:app, :db]
|
||||||
|
@ -258,6 +264,18 @@ class ConfigurationActionsInvocationTest < Test::Unit::TestCase
|
||||||
end
|
end
|
||||||
end
|
end
|
||||||
|
|
||||||
|
def test_run_only_logs_once
|
||||||
|
@config.servers = [:app, :db]
|
||||||
|
|
||||||
|
logger = mock('logger')
|
||||||
|
logger.stubs(:debug).with("executing \"ls\"")
|
||||||
|
@config.stubs(:logger).returns(logger)
|
||||||
|
|
||||||
|
@config.expects(:execute_on_servers)
|
||||||
|
|
||||||
|
@config.run("ls")
|
||||||
|
end
|
||||||
|
|
||||||
private
|
private
|
||||||
|
|
||||||
def make_config
|
def make_config
|
||||||
|
|
Loading…
Reference in a new issue