diff options
author | Eric Wong <e@80x24.org> | 2018-12-28 10:16:11 +0000 |
---|---|---|
committer | Eric Wong <e@80x24.org> | 2018-12-28 19:17:47 +0000 |
commit | 0e933ed9b8a751d70623f72fbee98ad77af7578c (patch) | |
tree | 65bd5a2c4ef8cec4908c645529c5417c5f0a3ec9 /t | |
parent | c5d3dc3122323bda426de9251fcbdb2561570c42 (diff) | |
download | public-inbox-0e933ed9b8a751d70623f72fbee98ad77af7578c.tar.gz |
This allows archivists to publish incomplete archives with newer mail while allowing "0.git" (or "1.git" and so on) epochs to be added-after-the-fact (without affecting "git clone" followers). A reindex will be necessary for Xapian and SQLite to catch up once the old epochs are added; but the reindexing code is also capable of tolerating missing epochs.
Diffstat (limited to 't')
-rw-r--r-- | t/init.t | 16 |
1 files changed, 16 insertions, 0 deletions
@@ -79,6 +79,22 @@ SKIP: { is(system(@cmd), 0, "-init -L $lvl"); is(read_indexlevel("v2$lvl"), $lvl, "indexlevel set to '$lvl'"); } + + # loop for idempotency + for (1..2) { + @cmd = (pi_init, '-V2', '-S1', 'skip1', "$tmpdir/skip1", + qw(http://example.com/skip1 skip1@example.com)); + is(system(@cmd), 0, "--skip 1"); + my $gits = [ glob("$tmpdir/skip1/git/*.git") ]; + is_deeply(["$tmpdir/skip1/git/1.git"], $gits, 'skip OK'); + } + + + @cmd = (pi_init, '-V2', '--skip=2', 'skip2', "$tmpdir/skip2", + qw(http://example.com/skip2 skip2@example.com)); + is(system(@cmd), 0, "--skip 2"); + my $gits = [ glob("$tmpdir/skip2/git/*.git") ]; + is_deeply(["$tmpdir/skip2/git/2.git"], $gits, 'skipping 2 works, too'); } done_testing(); |