diff options
author | Eric Wong <e@80x24.org> | 2021-11-22 07:42:41 +0000 |
---|---|---|
committer | Eric Wong <e@80x24.org> | 2021-11-22 21:36:50 +0000 |
commit | 03de71b293b52db96a254bad2822f863743f5e7d (patch) | |
tree | 50d53cead9cade73691e418586405cc7c012abf4 /t | |
parent | 60affc82cf7ea69a58f675a5c5cca8f7b697f73e (diff) | |
download | public-inbox-03de71b293b52db96a254bad2822f863743f5e7d.tar.gz |
We can't compare created_at times with lei if lei tests are skipped due to Inline::C or Socket::MsgHdr unavailability. Reported-by: Jörg Rödel <joro@8bytes.org> Link: https://public-inbox.org/meta/YZebmAxlFJy4lqAw@8bytes.org/
Diffstat (limited to 't')
-rw-r--r-- | t/lei-mirror.t | 18 |
1 files changed, 12 insertions, 6 deletions
diff --git a/t/lei-mirror.t b/t/lei-mirror.t index 646ff2b1..32a5b039 100644 --- a/t/lei-mirror.t +++ b/t/lei-mirror.t @@ -170,12 +170,18 @@ 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'); |