]> Sergey Matveev's repositories - public-inbox.git/blobdiff - t/psgi_v2.t
tests: favor IPv6
[public-inbox.git] / t / psgi_v2.t
index bdc1a3c41533d40c1a7c6662139b30214bacc4ee..81355f04b1b0694b0bb30b6023bc107cdedbde0b 100644 (file)
@@ -1,4 +1,4 @@
-# Copyright (C) 2018-2020 all contributors <meta@public-inbox.org>
+# Copyright (C) 2018-2021 all contributors <meta@public-inbox.org>
 # License: AGPL-3.0+ <https://www.gnu.org/licenses/agpl-3.0.txt>
 use strict;
 use warnings;
@@ -35,7 +35,7 @@ my $run_httpd = sub {
                my ($out, $err) = map { "$inboxdir/std$_.log" } qw(out err);
                my $cmd = [ qw(-httpd -W0), "--stdout=$out", "--stderr=$err" ];
                my $td = start_script($cmd, $env, { 3 => $sock });
-               my ($h, $p) = ($sock->sockhost, $sock->sockport);
+               my ($h, $p) = tcp_host_port($sock);
                local $ENV{PLACK_TEST_EXTERNALSERVER_URI} = "http://$h:$p";
                Plack::Test::ExternalServer::test_psgi(client => $client);
                $td->join('TERM');