Plack::Test::ExternalServer::test_psgi(client => $client);
$td->join('TERM');
open my $fh, '<', $err or BAIL_OUT $!;
- is(do { local $/; <$fh> }, '', 'no errors');
+ my $e = do { local $/; <$fh> };
+ if ($e =~ s/^Plack::Middleware::ReverseProxy missing,\n//gms) {
+ $e =~ s/^URL generation for redirects .*\n//gms;
+ }
+ is($e, '', 'no errors');
}
};
'"From_" line stored to test old bug workaround');
my $cfgpfx = "publicinbox.v2test";
-my $cfg = <<EOF;
+my $cfg = PublicInbox::Config->new(\<<EOF);
$cfgpfx.address=$ibx->{-primary_address}
$cfgpfx.inboxdir=$inboxdir
EOF
-my $config = PublicInbox::Config->new(\$cfg);
-my $www = PublicInbox::WWW->new($config);
+my $www = PublicInbox::WWW->new($cfg);
my ($res, $raw, @from_);
my $client0 = sub {
my ($cb) = @_;
like($raw, qr/^hello ghosts$/m, 'got third message');
@from_ = ($raw =~ m/^From /mg);
is(scalar(@from_), 3, 'three From_ lines');
- $config->each_inbox(sub { $_[0]->search->reopen });
+ $cfg->each_inbox(sub { $_[0]->search->reopen });
SKIP: {
eval { require IO::Uncompress::Gunzip };
$im->done;
my @h = $mime->header('Message-ID');
is_deeply($exp, \@h, 'reused existing Message-ID');
- $config->each_inbox(sub { $_[0]->search->reopen });
+ $cfg->each_inbox(sub { $_[0]->search->reopen });
}
my $client2 = sub {
ok($im->add($mime), "added attachment $body");
}
$im->done;
- $config->each_inbox(sub { $_[0]->search->reopen });
+ $cfg->each_inbox(sub { $_[0]->search->reopen });
}
my $client3 = sub {
}
$res = $cb->(GET('/v2test/?t=1970'.'01'.'01'.'000000'));
is($res->code, 404, '404 for out-of-range t= param');
+ @warn = ();
+ $res = $cb->(GET('/v2test/?t=1970'.'01'.'01'));
+ is_deeply(\@warn, [], 'no warnings on YYYYMMDD only');
};
test_psgi(sub { $www->call(@_) }, $client3);
$run_httpd->($client3, 4);