]> Sergey Matveev's repositories - public-inbox.git/blobdiff - t/httpd.t
tests: common tcp_server and unix_server helpers
[public-inbox.git] / t / httpd.t
index e085c4b9f502b2bbdae5828ff379ddb332fcbfd9..e0a2bf44164a0f79d6be8b6a34471337645352b0 100644 (file)
--- a/t/httpd.t
+++ b/t/httpd.t
@@ -24,15 +24,7 @@ my $addr = $group . '@example.com';
 my $cfgpfx = "publicinbox.$group";
 my $httpd = 'blib/script/public-inbox-httpd';
 my $init = 'blib/script/public-inbox-init';
-
-my %opts = (
-       LocalAddr => '127.0.0.1',
-       ReuseAddr => 1,
-       Proto => 'tcp',
-       Type => SOCK_STREAM,
-       Listen => 1024,
-);
-my $sock = IO::Socket::INET->new(%opts);
+my $sock = tcp_server();
 my $pid;
 use_ok 'PublicInbox::Git';
 use_ok 'PublicInbox::Import';