X-Git-Url: http://www.git.stargrave.org/?a=blobdiff_plain;f=t%2Flei-mirror.t;h=32a5b03907147354f11bdd49d05a498f6f2bbd08;hb=778fa5917ec3b46daa09819296d91cdbe855352d;hp=294eb6542b2e6e50ed941553fa1e3650b72a9b02;hpb=3f017d96973875b651d7dc456840d62c35968e2c;p=public-inbox.git diff --git a/t/lei-mirror.t b/t/lei-mirror.t index 294eb654..32a5b039 100644 --- a/t/lei-mirror.t +++ b/t/lei-mirror.t @@ -170,12 +170,24 @@ SKIP: { local $ENV{HOME} = $tmpdir; ok(run_script([qw(-index -Lbasic), "$d/t1"]), 'index v1'); ok(run_script([qw(-index -Lbasic), "$d/t2"]), 'index v2'); - my $f = "$d/t1/public-inbox/msgmap.sqlite3"; - my $ca = PublicInbox::Msgmap->new_file($f)->created_at; - is($ca, $created{v1}, 'clone + index v1 synced ->created_at'); - $f = "$d/t2/msgmap.sqlite3"; - $ca = PublicInbox::Msgmap->new_file($f)->created_at; - is($ca, $created{v2}, 'clone + index v1 synced ->created_at'); + + SKIP: { + join('', sort(keys %created)) eq 'v1v2' or + skip "lei didn't run", 2; + my $f = "$d/t1/public-inbox/msgmap.sqlite3"; + my $ca = PublicInbox::Msgmap->new_file($f)->created_at; + is($ca, $created{v1}, 'clone + index v1 synced ->created_at'); + + $f = "$d/t2/msgmap.sqlite3"; + $ca = PublicInbox::Msgmap->new_file($f)->created_at; + is($ca, $created{v2}, 'clone + index v2 synced ->created_at'); + } + test_lei(sub { + lei_ok qw(inspect num:1 --dir), "$d/t1"; + ok(ref(json_utf8->decode($lei_out)), 'inspect num: on v1'); + lei_ok qw(inspect num:1 --dir), "$d/t2"; + ok(ref(json_utf8->decode($lei_out)), 'inspect num: on v2'); + }); } ok($td->kill, 'killed -httpd');