GSP
Quick Navigator

Search Site

Unix VPS
A - Starter
B - Basic
C - Preferred
D - Commercial
MPS - Dedicated
Previous VPSs
* Sign Up! *

Support
Contact Us
Online Help
Handbooks
Domain Status
Man Pages

FAQ
Virtual Servers
Pricing
Billing
Technical

Network
Facilities
Connectivity
Topology Map

Miscellaneous
Server Agreement
Year 2038
Credits
 

USA Flag

 

 

Man Pages


Manual Reference Pages  -  PLACK::APP::PROXY::TEST (3)

.ds Aq ’

NAME

Plack::App::Proxy::Test - Is utilities to test Plack::App::Proxy.

CONTENTS

SYNOPSIS



  test_proxy(
      app   => $backend_app,
      proxy => sub { Plack::App::Proxy->new(remote => "http://$_[0]:$_[1]") },
      client => sub {
          my $cb = shift;
          my $res = $cb->(GET /);
          ok $res->is_success, "Check the status line.";
      },
  );



DESCRIPTION

Plack::App::Proxy::Test provids test_proxy function which wraps test_psgi of Plack::Test simply.

FUNCTIONS

test_proxy


  test_proxy app    => $app,
             proxy  => $proxy_cb->($app_host, $app_port),
             client => $client_cb->($cb);



test_proxy runs two servers, ’app’ as an origin server and the proxy server. In ’proxy’ callback, you should create the proxy server instance to send requests to ’app’ server. Then ’client’ callback is called to run your tests. In ’client’ callback, all HTTP requests are sent to ’proxy’ server. (And the proxy server will proxy your request to the app server.)

AUTHOR

Masahiro Honma <hiratara@cpan.org>

SEE ALSO

Plack::App::Proxy Plack::Test
Search for    or go to Top of page |  Section 3 |  Main Index


perl v5.20.3 PLACK::APP::PROXY::TEST (3) 2012-11-05

Powered by GSP Visit the GSP FreeBSD Man Page Interface.
Output converted with manServer 1.07.