X-Git-Url: http://git.shadowcat.co.uk/gitweb/gitweb.cgi?p=catagits%2FCatalyst-Runtime.git;a=blobdiff_plain;f=t%2Foptional_lighttpd-fastcgi-non-root.t;h=80600f9554fadc730c9cb6596a305caa207d7c95;hp=5f8ba1b19602d7c2a225c51e96dfacdee9506c3f;hb=fcfe92b170baa438adf1ff92057ac007781d02b4;hpb=a68314c2bb8ad7c2fc95f0008df7e4ebd35e5ebe diff --git a/t/optional_lighttpd-fastcgi-non-root.t b/t/optional_lighttpd-fastcgi-non-root.t index 5f8ba1b..80600f9 100644 --- a/t/optional_lighttpd-fastcgi-non-root.t +++ b/t/optional_lighttpd-fastcgi-non-root.t @@ -1,16 +1,16 @@ -#!perl - use strict; use warnings; +use Test::More; +BEGIN { + plan skip_all => 'set TEST_LIGHTTPD to enable this test' + unless $ENV{TEST_LIGHTTPD}; +} + use File::Path; use FindBin; use IO::Socket; -use Test::More; -plan skip_all => 'set TEST_LIGHTTPD to enable this test' - unless $ENV{TEST_LIGHTTPD}; - eval "use FCGI"; plan skip_all => 'FCGI required' if $@; @@ -69,7 +69,7 @@ server.bind = "127.0.0.1" server.port = $port # Work around inability to hit http://localhost/deep/path -# without a trailing slash +# without a trailing slash url.rewrite = ( "deep/path\$" => "deep/path/" ) # catalyst app specific fcgi setup @@ -90,14 +90,14 @@ fastcgi.server = ( ) END -open(my $lightconf, '>', "$docroot/lighttpd.conf") +open(my $lightconf, '>', "$docroot/lighttpd.conf") or die "Can't open $docroot/lighttpd.conf: $!"; print {$lightconf} $conf or die "Write error: $!"; close $lightconf; -my $pid = open my $lighttpd, "$lighttpd_bin -D -f $docroot/lighttpd.conf 2>&1 |" +my $pid = open my $lighttpd, "$lighttpd_bin -D -f $docroot/lighttpd.conf 2>&1 |" or die "Unable to spawn lighttpd: $!"; - + # wait for it to start while ( check_port( 'localhost', $port ) != 1 ) { diag "Waiting for server to start...";