diff options
author | Eric Wong <e@80x24.org> | 2019-05-14 03:32:00 +0000 |
---|---|---|
committer | Eric Wong <e@80x24.org> | 2019-05-14 03:43:21 +0000 |
commit | 46835d34029c92a2da886e5d0c17ec83cf86a209 (patch) | |
tree | 273aa752115d28b6464044432d55efd13b4ea8c2 /t | |
parent | d883d4a93b23be134038e28f421eafca70c3d838 (diff) | |
download | public-inbox-46835d34029c92a2da886e5d0c17ec83cf86a209.tar.gz |
PublicInbox::DS works for every platform we we care about, nowadays; so checking for it is a waste of time. Cleanup a few POSIX and Socket imports while we're in the area.
Diffstat (limited to 't')
-rw-r--r-- | t/git-http-backend.t | 10 | ||||
-rw-r--r-- | t/httpd-corner.t | 6 | ||||
-rw-r--r-- | t/httpd-unix.t | 3 | ||||
-rw-r--r-- | t/httpd.t | 6 | ||||
-rw-r--r-- | t/nntp.t | 2 | ||||
-rw-r--r-- | t/nntpd.t | 4 | ||||
-rw-r--r-- | t/v2mirror.t | 2 | ||||
-rw-r--r-- | t/v2writable.t | 7 |
8 files changed, 16 insertions, 24 deletions
diff --git a/t/git-http-backend.t b/t/git-http-backend.t index b616e822..5ac0a4a5 100644 --- a/t/git-http-backend.t +++ b/t/git-http-backend.t @@ -4,21 +4,19 @@ use strict; use warnings; use Test::More; use File::Temp qw/tempdir/; -use IO::Socket; -use Socket qw(SO_KEEPALIVE IPPROTO_TCP TCP_NODELAY); -use POSIX qw(dup2 setsid); -use Cwd qw(getcwd); +use IO::Socket::INET; +use POSIX qw(setsid); my $git_dir = $ENV{GIANT_GIT_DIR}; plan 'skip_all' => 'GIANT_GIT_DIR not defined' unless $git_dir; -foreach my $mod (qw(PublicInbox::DS BSD::Resource +foreach my $mod (qw(BSD::Resource Plack::Util Plack::Builder HTTP::Date HTTP::Status Net::HTTP)) { eval "require $mod"; plan skip_all => "$mod missing for git-http-backend.t" if $@; } require './t/common.perl'; -my $psgi = getcwd()."/t/git-http-backend.psgi"; +my $psgi = "./t/git-http-backend.psgi"; my $tmpdir = tempdir('pi-git-http-backend-XXXXXX', TMPDIR => 1, CLEANUP => 1); my $err = "$tmpdir/stderr.log"; my $out = "$tmpdir/stdout.log"; diff --git a/t/httpd-corner.t b/t/httpd-corner.t index 49c5d1fe..bfa39205 100644 --- a/t/httpd-corner.t +++ b/t/httpd-corner.t @@ -7,7 +7,7 @@ use warnings; use Test::More; use Time::HiRes qw(gettimeofday tv_interval); -foreach my $mod (qw(Plack::Util Plack::Builder PublicInbox::DS +foreach my $mod (qw(Plack::Util Plack::Builder HTTP::Date HTTP::Status IPC::Run)) { eval "require $mod"; plan skip_all => "$mod missing for httpd-corner.t" if $@; @@ -19,8 +19,8 @@ use Cwd qw/getcwd/; use IO::Socket; use IO::Socket::UNIX; use Fcntl qw(:seek); -use Socket qw(SO_KEEPALIVE IPPROTO_TCP TCP_NODELAY); -use POSIX qw(mkfifo :sys_wait_h); +use Socket qw(IPPROTO_TCP TCP_NODELAY); +use POSIX qw(mkfifo); require './t/common.perl'; my $tmpdir = tempdir('httpd-corner-XXXXXX', TMPDIR => 1, CLEANUP => 1); my $fifo = "$tmpdir/fifo"; diff --git a/t/httpd-unix.t b/t/httpd-unix.t index 627adfaf..2ef64dfc 100644 --- a/t/httpd-unix.t +++ b/t/httpd-unix.t @@ -5,8 +5,7 @@ use strict; use warnings; use Test::More; -foreach my $mod (qw(Plack::Util Plack::Builder PublicInbox::DS - HTTP::Date HTTP::Status)) { +foreach my $mod (qw(Plack::Util Plack::Builder HTTP::Date HTTP::Status)) { eval "require $mod"; plan skip_all => "$mod missing for httpd-unix.t" if $@; } @@ -4,15 +4,13 @@ use strict; use warnings; use Test::More; -foreach my $mod (qw(Plack::Util Plack::Builder PublicInbox::DS - HTTP::Date HTTP::Status)) { +foreach my $mod (qw(Plack::Util Plack::Builder HTTP::Date HTTP::Status)) { eval "require $mod"; plan skip_all => "$mod missing for httpd.t" if $@; } use File::Temp qw/tempdir/; use Cwd qw/getcwd/; -use IO::Socket; -use Socket qw(SO_KEEPALIVE IPPROTO_TCP TCP_NODELAY); +use IO::Socket::INET; require './t/common.perl'; # FIXME: too much setup @@ -5,7 +5,7 @@ use warnings; use Test::More; use Data::Dumper; -foreach my $mod (qw(DBD::SQLite Search::Xapian PublicInbox::DS)) { +foreach my $mod (qw(DBD::SQLite Search::Xapian)) { eval "require $mod"; plan skip_all => "$mod missing for nntp.t" if $@; } @@ -3,7 +3,7 @@ use strict; use warnings; use Test::More; -foreach my $mod (qw(DBD::SQLite Search::Xapian PublicInbox::DS)) { +foreach my $mod (qw(DBD::SQLite Search::Xapian)) { eval "require $mod"; plan skip_all => "$mod missing for nntpd.t" if $@; } @@ -12,7 +12,7 @@ require PublicInbox::Msgmap; use Cwd; use Email::Simple; use IO::Socket; -use Socket qw(SO_KEEPALIVE IPPROTO_TCP TCP_NODELAY); +use Socket qw(IPPROTO_TCP TCP_NODELAY); use File::Temp qw/tempdir/; use Net::NNTP; use Sys::Hostname; diff --git a/t/v2mirror.t b/t/v2mirror.t index eaf9e61d..441e36d7 100644 --- a/t/v2mirror.t +++ b/t/v2mirror.t @@ -7,7 +7,7 @@ require './t/common.perl'; require_git(2.6); # Integration tests for HTTP cloning + mirroring -foreach my $mod (qw(Plack::Util Plack::Builder PublicInbox::DS +foreach my $mod (qw(Plack::Util Plack::Builder HTTP::Date HTTP::Status Search::Xapian DBD::SQLite IPC::Run)) { eval "require $mod"; diff --git a/t/v2writable.t b/t/v2writable.t index 75110155..5f34d127 100644 --- a/t/v2writable.t +++ b/t/v2writable.t @@ -127,12 +127,9 @@ if ('ensure git configs are correct') { 'same document') if ($mset1->size); } -SKIP: { +{ use Net::NNTP; - use IO::Socket; - use Socket qw(SO_KEEPALIVE IPPROTO_TCP TCP_NODELAY); - eval { require PublicInbox::DS }; - skip "PublicInbox::DS missing $@", 2 if $@; + use IO::Socket::INET; my $err = "$mainrepo/stderr.log"; my $out = "$mainrepo/stdout.log"; my %opts = ( |