about summary refs log tree commit homepage
diff options
context:
space:
mode:
authorEric Wong <normalperson@yhbt.net>2010-06-17 07:02:33 +0000
committerEric Wong <normalperson@yhbt.net>2010-06-17 07:03:22 +0000
commitbb6b693ae1eb0a32f374ab5d6ebf8f595be2812d (patch)
treeeb213f61d648fbd09c263d5337589b2b1a5aadf7
parentb64099a18c7a353d2b6f34ad84da8afafd6f873d (diff)
downloadunicorn-bb6b693ae1eb0a32f374ab5d6ebf8f595be2812d.tar.gz
test-lib handles variables named "*socket" (and "*fifo")
differently than ordinary variables.
-rwxr-xr-xt/t0303-rails3-alt-working_directory_config.ru.sh11
-rwxr-xr-xt/t0304-rails3-alt-working_directory_no_embed_cli.sh11
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" && {