X-Git-Url: http://git.shadowcat.co.uk/gitweb/gitweb.cgi?p=catagits%2FCatalyst-Runtime.git;a=blobdiff_plain;f=t%2Faggregate%2Flive_engine_request_remote_user.t;h=e6c87471bbcda4b37a6c5c01de613ef53e01b17e;hp=10b071b999006bc40d97c19a47b69a451bcdefe7;hb=35b3434762d426e0cd5e04eb735291f8ca7ea08e;hpb=8026359e6ff39e39df67381dcf52a15df78804cf diff --git a/t/aggregate/live_engine_request_remote_user.t b/t/aggregate/live_engine_request_remote_user.t index 10b071b..e6c8747 100644 --- a/t/aggregate/live_engine_request_remote_user.t +++ b/t/aggregate/live_engine_request_remote_user.t @@ -1,5 +1,3 @@ -#!perl - # This tests to make sure the REMOTE_USER environment variable is properly passed through by the engine. use strict; @@ -17,12 +15,11 @@ use HTTP::Request::Common; { my $creq; - local $ENV{REMOTE_USER} = 'dwc'; my $request = GET( 'http://localhost/dump/request', ); - ok( my $response = request($request), 'Request' ); + ok( my $response = request($request, { extra_env => { REMOTE_USER => 'dwc' } }), 'Request' ); ok( $response->is_success, 'Response Successful 2xx' ); is( $response->content_type, 'text/plain', 'Response Content-Type' ); like( $response->content, qr/'Catalyst::Request'/, @@ -33,10 +30,16 @@ use HTTP::Request::Common; ok( eval '$creq = ' . $response->content, 'Unserialize Catalyst::Request' - ); + ) + or fail("Failed to deserialize $@ from " . $response->content); } isa_ok( $creq, 'Catalyst::Request' ); - - is( $creq->remote_user, 'dwc', '$c->req->remote_user ok' ); + SKIP: + { + if ( $ENV{CATALYST_SERVER} ) { + skip 'Using remote server', 1; + } + is( $creq->remote_user, 'dwc', '$c->req->remote_user ok' ); + } }