about summary refs log tree commit homepage
path: root/t/nntpd-tls.t
diff options
context:
space:
mode:
authorEric Wong <e@80x24.org>2019-06-30 22:19:38 +0000
committerEric Wong <e@80x24.org>2019-06-30 22:25:23 +0000
commit3eb26fe04dae68612c841e749abd2848ce78ae59 (patch)
tree4047806eec0029de5cea7db2b18ec4408d8ec65d /t/nntpd-tls.t
parent0b84d8600368c67080e683e415f7e502a343316b (diff)
downloadpublic-inbox-3eb26fe04dae68612c841e749abd2848ce78ae59.tar.gz
IO::Socket:*->new options are verbose and we can save
a bunch of code by putting this into t/common.perl,
since the related spawn_listener stuff is already there.
Diffstat (limited to 't/nntpd-tls.t')
-rw-r--r--t/nntpd-tls.t11
1 files changed, 2 insertions, 9 deletions
diff --git a/t/nntpd-tls.t b/t/nntpd-tls.t
index e3ecdd4f..82b63f3e 100644
--- a/t/nntpd-tls.t
+++ b/t/nntpd-tls.t
@@ -37,15 +37,8 @@ my $pi_config = "$tmpdir/pi_config";
 my $group = 'test-nntpd-tls';
 my $addr = $group . '@example.com';
 my $nntpd = 'blib/script/public-inbox-nntpd';
-my %opts = (
-        LocalAddr => '127.0.0.1',
-        ReuseAddr => 1,
-        Proto => 'tcp',
-        Type => SOCK_STREAM,
-        Listen => 1024,
-);
-my $starttls = IO::Socket::INET->new(%opts);
-my $nntps = IO::Socket::INET->new(%opts);
+my $starttls = tcp_server();
+my $nntps = tcp_server();
 my ($pid, $tail_pid);
 END {
         foreach ($pid, $tail_pid) {