]> Sergey Matveev's repositories - public-inbox.git/blobdiff - t/www_altid.t
tests: favor IPv6
[public-inbox.git] / t / www_altid.t
index a885c3897c6bbbd7735acc1e9206777d8dba6aea..784acc8b1b5906ffffdebf69b945f7345989b2f4 100644 (file)
@@ -1,4 +1,4 @@
-# Copyright (C) 2020 all contributors <meta@public-inbox.org>
+# Copyright (C) 2020-2021 all contributors <meta@public-inbox.org>
 # License: AGPL-3.0+ <https://www.gnu.org/licenses/agpl-3.0.txt>
 use strict;
 use Test::More;
@@ -26,7 +26,7 @@ if ('setup') {
        my $ibx = PublicInbox::Inbox->new($opts);
        $ibx = PublicInbox::InboxWritable->new($ibx, 1);
        my $im = $ibx->importer(0);
-       my $mime = PublicInbox::MIME->new(<<'EOF');
+       my $mime = PublicInbox::Eml->new(<<'EOF');
 From: a@example.com
 Message-Id: <a@example.com>
 
@@ -76,7 +76,7 @@ SKIP: {
        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);
 }