-test_psgi(sub { $www->call(@_) }, $client);
-SKIP: {
- require_mods(qw(Plack::Test::ExternalServer), 37);
- my $cfgpath = "$inboxdir/$$.config";
- open my $fh, '>', $cfgpath or BAIL_OUT $!;
- print $fh <<EOF or BAIL_OUT $!;
-[publicinbox "v2test"]
- inboxdir = $inboxdir
- address = test\@example.com
-EOF
- close $fh or BAIL_OUT $!;
- my $env = { PI_CONFIG => $cfgpath };
- my $sock = tcp_server() or die;
- my ($out, $err) = map { "$inboxdir/std$_.log" } qw(out err);
- my $cmd = [ qw(-httpd -W0), "--stdout=$out", "--stderr=$err" ];
- my $td = start_script($cmd, $env, { 3 => $sock });
- my ($h, $p) = ($sock->sockhost, $sock->sockport);
- local $ENV{PLACK_TEST_EXTERNALSERVER_URI} = "http://$h:$p";
- Plack::Test::ExternalServer::test_psgi(client => $client);
- $td->join('TERM');
- open $fh, '<', $err or BAIL_OUT $!;
- is(do { local $/; <$fh> }, '', 'no errors');
-};
+test_psgi(sub { $www->call(@_) }, $client1);
+test_httpd($env, $client1, 38);