unofficial mirror of meta@public-inbox.org
 help / color / mirror / Atom feed
* [PATCH] t/psgi_v2: ignore warnings on missing P::M::ReverseProxy
@ 2020-12-16  4:39 Eric Wong
  0 siblings, 0 replies; only message in thread
From: Eric Wong @ 2020-12-16  4:39 UTC (permalink / raw)
  To: meta

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');
 	}
 };
 

^ permalink raw reply related	[flat|nested] only message in thread

only message in thread, other threads:[~2020-12-16  4:39 UTC | newest]

Thread overview: (only message) (download: mbox.gz / follow: Atom feed)
-- links below jump to the message on this page --
2020-12-16  4:39 [PATCH] t/psgi_v2: ignore warnings on missing P::M::ReverseProxy Eric Wong

This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox;
as well as URLs for read-only IMAP folder(s) and NNTP newsgroup(s).