]> Sergey Matveev's repositories - public-inbox.git/commitdiff
t/psgi_v2: ignore warnings on missing P::M::ReverseProxy
authorEric Wong <e@80x24.org>
Wed, 16 Dec 2020 04:39:37 +0000 (04:39 +0000)
committerEric Wong <e@80x24.org>
Thu, 17 Dec 2020 10:02:43 +0000 (10:02 +0000)
Plack::Test::ExternalServer doesn't depend on
Plack::Middleware::ReverseProxy, so we need to account for
some warnings in stderr if P::M::RP is missing.

t/psgi_v2.t

index 0ceb26ed8c9bdbaf4b1f15ef550f35c8511864e2..bdc1a3c41533d40c1a7c6662139b30214bacc4ee 100644 (file)
@@ -40,7 +40,11 @@ my $run_httpd = sub {
                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');
        }
 };