From 334e37421ef4fcd9d70538c926c52b871897d419 Mon Sep 17 00:00:00 2001 From: Eric Wong Date: Tue, 3 Nov 2009 23:34:45 -0800 Subject: configurator: working_directory affects pid, std{err,out}_paths It makes more sense this way since users usually expect config file directives to be order-independent. --- test/exec/test_exec.rb | 45 +++++++++++++++++++++++++++++++++++++++++++++ 1 file changed, 45 insertions(+) (limited to 'test') diff --git a/test/exec/test_exec.rb b/test/exec/test_exec.rb index 7edfa71..4625b45 100644 --- a/test/exec/test_exec.rb +++ b/test/exec/test_exec.rb @@ -114,6 +114,51 @@ EOF FileUtils.rmtree(other.path) end + def test_working_directory_controls_relative_paths + other = Tempfile.new('unicorn.wd') + File.unlink(other.path) + Dir.mkdir(other.path) + File.open("config.ru", "wb") do |fp| + fp.syswrite < 'text/plain' }, [ Dir.pwd ] ] } +EOF + end + FileUtils.cp("config.ru", other.path + "/config.ru") + system('mkfifo', "#{other.path}/fifo") + tmp = Tempfile.new('unicorn.config') + tmp.syswrite <