From 5470d0688ec610861241408790d22b583e211ac5 Mon Sep 17 00:00:00 2001 From: Eric Wong Date: Mon, 21 Jun 2010 03:11:29 +0000 Subject: [PATCH] tests: avoid embedded command-line switches in tests They're ugly and potentially non-portable to other servers. They also make Unicorn + Rubinius unhappy, which makes us unhappy as well. --- t/fork-sleep.ru | 1 - t/simple-http_ActorSpawn.ru | 9 +++++++++ t/t0009-broken-app.sh | 2 +- t/t0009.ru | 1 - t/t0011-close-on-exec-set.sh | 2 +- 5 files changed, 11 insertions(+), 4 deletions(-) create mode 100644 t/simple-http_ActorSpawn.ru diff --git a/t/fork-sleep.ru b/t/fork-sleep.ru index 747a06d..1523c25 100644 --- a/t/fork-sleep.ru +++ b/t/fork-sleep.ru @@ -1,4 +1,3 @@ -#\-E none # we do not want Rack::Lint or anything to protect us use Rack::ContentLength use Rack::ContentType, "text/plain" diff --git a/t/simple-http_ActorSpawn.ru b/t/simple-http_ActorSpawn.ru new file mode 100644 index 0000000..da17d5d --- /dev/null +++ b/t/simple-http_ActorSpawn.ru @@ -0,0 +1,9 @@ +use Rack::ContentLength +use Rack::ContentType +run lambda { |env| + if env['rack.multithread'] && env['rainbows.model'] == :ActorSpawn + [ 200, {}, [ Actor.current.inspect << "\n" ] ] + else + raise "rack.multithread is not true" + end +} diff --git a/t/t0009-broken-app.sh b/t/t0009-broken-app.sh index dc1f9b1..5ccb400 100755 --- a/t/t0009-broken-app.sh +++ b/t/t0009-broken-app.sh @@ -5,7 +5,7 @@ t_plan 9 "graceful handling of broken apps for $model" t_begin "setup and start" && { rainbows_setup $model 1 - rainbows -D t0009.ru -c $unicorn_config + rainbows -E none -D t0009.ru -c $unicorn_config rainbows_wait_start } diff --git a/t/t0009.ru b/t/t0009.ru index bc7cb0b..d05d7ab 100644 --- a/t/t0009.ru +++ b/t/t0009.ru @@ -1,4 +1,3 @@ -#\-E none # we do not want Rack::Lint or anything to protect us use Rack::ContentLength use Rack::ContentType, "text/plain" diff --git a/t/t0011-close-on-exec-set.sh b/t/t0011-close-on-exec-set.sh index 0429851..7ff0a6b 100755 --- a/t/t0011-close-on-exec-set.sh +++ b/t/t0011-close-on-exec-set.sh @@ -6,7 +6,7 @@ t_plan 7 "ensure close-on-exec flag is set for $model" t_begin "setup and start" && { rainbows_setup $model 1 1 - nr=$nr rainbows -D fork-sleep.ru -c $unicorn_config + nr=$nr rainbows -E none -D fork-sleep.ru -c $unicorn_config rainbows_wait_start } -- 2.11.4.GIT