]> Sergey Matveev's repositories - public-inbox.git/blobdiff - t/v2mirror.t
tests: add require_cmd, require curl when needed
[public-inbox.git] / t / v2mirror.t
index b0075fcc88702b14c954bb606252a6bcd186a7f9..8bcffc29265a81cde1037e59f211b3b760726dc0 100644 (file)
@@ -1,19 +1,17 @@
 # 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;
-use Test::More;
+use v5.10.1;
 use PublicInbox::TestCommon;
 use File::Path qw(remove_tree);
 use Cwd qw(abs_path);
 require_git(2.6);
+require_cmd('curl');
 local $ENV{HOME} = abs_path('t');
 
 # Integration tests for HTTP cloning + mirroring
 require_mods(qw(Plack::Util Plack::Builder
                HTTP::Date HTTP::Status Search::Xapian DBD::SQLite));
-use IO::Socket;
-use POSIX qw(dup2);
 use_ok 'PublicInbox::V2Writable';
 use PublicInbox::InboxWritable;
 use PublicInbox::Eml;
@@ -99,10 +97,6 @@ $ibx->cleanup;
 
 my @new_epochs;
 my $fetch_each_epoch = sub {
-       my $mf = "$tmpdir/m/manifest.js.gz";
-       if (my @st = stat($mf)) {
-               utime($st[8], $st[9] - 1, $mf) or xbail "utime $mf: $!";
-       }
        my %before = map { $_ => 1 } glob("$tmpdir/m/git/*");
        run_script([qw(-fetch -q)], undef, {-C => "$tmpdir/m"}) or
                xbail '-fetch fail';