From bb6b693ae1eb0a32f374ab5d6ebf8f595be2812d Mon Sep 17 00:00:00 2001 From: Eric Wong Date: Thu, 17 Jun 2010 07:02:33 +0000 Subject: t030[34]: proper temporary UNIX domain socket handling test-lib handles variables named "*socket" (and "*fifo") differently than ordinary variables. --- t/t0303-rails3-alt-working_directory_config.ru.sh | 11 +++++++---- t/t0304-rails3-alt-working_directory_no_embed_cli.sh | 11 +++++++---- 2 files changed, 14 insertions(+), 8 deletions(-) diff --git a/t/t0303-rails3-alt-working_directory_config.ru.sh b/t/t0303-rails3-alt-working_directory_config.ru.sh index b6fe5e7..444f05a 100755 --- a/t/t0303-rails3-alt-working_directory_config.ru.sh +++ b/t/t0303-rails3-alt-working_directory_config.ru.sh @@ -10,8 +10,11 @@ t_plan 5 "Rails 3 (beta) inside alt working_directory (w/ config.ru)" t_begin "setup and start" && { unicorn_setup - rtmpfiles unicorn_config_tmp usock - rm -f $usock + rtmpfiles unicorn_config_tmp usocket + if test -e $usocket + then + die "unexpected $usocket" + fi rails3_app=$(cd rails3-app && pwd) rm -rf $t_pfx.app mkdir $t_pfx.app @@ -22,7 +25,7 @@ t_begin "setup and start" && { unicorn_setup rm $pid - echo "#\\--daemonize --host $host --port $port -l $usock" \ + echo "#\\--daemonize --host $host --port $port -l $usocket" \ >> $t_pfx.app/config.ru # we have --host/--port in config.ru instead @@ -48,7 +51,7 @@ t_begin "static file serving works" && { } t_begin "socket created" && { - test -S $usock + test -S $usocket } t_begin "killing succeeds" && { diff --git a/t/t0304-rails3-alt-working_directory_no_embed_cli.sh b/t/t0304-rails3-alt-working_directory_no_embed_cli.sh index 27676cb..c93f248 100755 --- a/t/t0304-rails3-alt-working_directory_no_embed_cli.sh +++ b/t/t0304-rails3-alt-working_directory_no_embed_cli.sh @@ -5,8 +5,11 @@ t_plan 5 "Rails 3 (beta) inside alt working_directory (no embedded switches)" t_begin "setup and start" && { unicorn_setup - rtmpfiles unicorn_config_tmp usock - rm -f $usock + rtmpfiles unicorn_config_tmp usocket + if test -e $usocket + then + die "unexpected $usocket" + fi rails3_app=$(cd rails3-app && pwd) rm -rf $t_pfx.app mkdir $t_pfx.app @@ -21,7 +24,7 @@ t_begin "setup and start" && { echo "working_directory '$t_pfx.app'" >> $unicorn_config_tmp cd / unicorn_rails -c $unicorn_config_tmp \ - --daemonize --host $host --port $port -l $usock + --daemonize --host $host --port $port -l $usocket } t_begin "pids in the right place" && { @@ -39,7 +42,7 @@ t_begin "static file serving works" && { } t_begin "socket created" && { - test -S $usock + test -S $usocket } t_begin "killing succeeds" && { -- cgit v1.2.3-24-ge0c7