From mboxrd@z Thu Jan 1 00:00:00 1970 Return-Path: X-Spam-Checker-Version: SpamAssassin 3.4.2 (2018-09-13) on dcvr.yhbt.net X-Spam-Level: X-Spam-Status: No, score=-4.0 required=3.0 tests=ALL_TRUSTED,BAYES_00 shortcircuit=no autolearn=ham autolearn_force=no version=3.4.2 Received: from localhost (dcvr.yhbt.net [127.0.0.1]) by dcvr.yhbt.net (Postfix) with ESMTP id 63CB61F4B4 for ; Wed, 16 Dec 2020 04:39:37 +0000 (UTC) From: Eric Wong To: meta@public-inbox.org Subject: [PATCH] t/psgi_v2: ignore warnings on missing P::M::ReverseProxy Date: Wed, 16 Dec 2020 04:39:37 +0000 Message-Id: <20201216043937.29390-1-e@80x24.org> MIME-Version: 1.0 Content-Transfer-Encoding: 8bit List-Id: 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 | 6 +++++- 1 file changed, 5 insertions(+), 1 deletion(-) diff --git a/t/psgi_v2.t b/t/psgi_v2.t index 0ceb26ed..bdc1a3c4 100644 --- a/t/psgi_v2.t +++ b/t/psgi_v2.t @@ -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'); } };