]> 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>
Sat, 26 Dec 2020 19:47:35 +0000 (19:47 +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.

(cherry picked from commit d26c2837f479b41182946a6540aad95d34b2b594)

t/psgi_v2.t

index 11aef5b3380c9c860e50161ae6e83fa83f27af6a..c13f5e71b18419300594c481720a2381b3d0dbf3 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');
        }
 };