1
0
Fork 0
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:
Lee Hambley 2016-01-08 10:32:26 +01:00
commit ed370e7b08
2 changed files with 19 additions and 1 deletions

View file

@ -320,7 +320,7 @@ module Capistrano
branches += server_branches
end
branches
end
end.compact.uniq
end
end

View file

@ -243,6 +243,12 @@ class ConfigurationActionsInvocationTest < Test::Unit::TestCase
def test_parallel_command_execution_with_matching_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
begin
@config.servers = [:app, :db]
@ -258,6 +264,18 @@ class ConfigurationActionsInvocationTest < Test::Unit::TestCase
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
def make_config