X-Git-Url: http://www.git.stargrave.org/?a=blobdiff_plain;f=t%2Findex-git-times.t;h=8f80c8669363d1892984bfa4487e3c1f779a8135;hb=1e3c53a422b8d23cff961e43f77ea0a835cdef78;hp=2e9e88e89794dd632850297ac0303c7e59838fe3;hpb=8e81d6f0d44198717ae540421a09824d75c9bb6d;p=public-inbox.git diff --git a/t/index-git-times.t b/t/index-git-times.t index 2e9e88e8..8f80c866 100644 --- a/t/index-git-times.t +++ b/t/index-git-times.t @@ -4,6 +4,7 @@ use Test::More; use PublicInbox::TestCommon; use PublicInbox::Import; use PublicInbox::Config; +use PublicInbox::Admin; use File::Path qw(remove_tree); require_mods(qw(DBD::SQLite Search::Xapian)); @@ -47,11 +48,15 @@ EOF PublicInbox::Import::run_die($cmd, undef, { 0 => $r }); } -run_script(['-index', $v1dir]) or die 'v1 index failed'; +run_script(['-index', '--skip-docdata', $v1dir]) or die 'v1 index failed'; + my $smsg; { my $cfg = PublicInbox::Config->new; my $ibx = $cfg->lookup($addr); + my $lvl = PublicInbox::Admin::detect_indexlevel($ibx); + is($lvl, 'medium', 'indexlevel detected'); + is($ibx->{-skip_docdata}, 1, '--skip-docdata flag set on -index'); $smsg = $ibx->over->get_art(1); is($smsg->{ds}, 749520000, 'datestamp from git author time'); is($smsg->{ts}, 1285977600, 'timestamp from git committer time'); @@ -70,6 +75,10 @@ SKIP: { my $check_v2 = sub { my $ibx = PublicInbox::Inbox->new({inboxdir => $v2dir, address => $addr}); + my $lvl = PublicInbox::Admin::detect_indexlevel($ibx); + is($lvl, 'medium', 'indexlevel detected after convert'); + is($ibx->{-skip_docdata}, 1, + '--skip-docdata preserved after convert'); my $v2smsg = $ibx->over->get_art(1); is($v2smsg->{ds}, $smsg->{ds}, 'v2 datestamp from git author time');