-
Notifications
You must be signed in to change notification settings - Fork 145
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
FastMail: test that rename a->c, b->a, c->b works
Even if replication didn't catch each step of the way!
- Loading branch information
Showing
1 changed file
with
31 additions
and
0 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,31 @@ | ||
#!perl | ||
use Cassandane::Tiny; | ||
|
||
sub test_mailbox_rename_switch_ab | ||
:AllowMoves :Replication :SyncLog :min_version_3_3 | ||
:needs_component_replication | ||
{ | ||
my ($self) = @_; | ||
|
||
my $mtalk = $self->{master_store}->get_client(); | ||
|
||
$mtalk->create('INBOX.Foo'); | ||
$mtalk->create('INBOX.Bar'); | ||
|
||
# replicate and check initial state | ||
my $synclogfname = "$self->{instance}->{basedir}/conf/sync/log"; | ||
$self->run_replication(rolling => 1, inputfile => $synclogfname); | ||
unlink($synclogfname); | ||
$self->check_replication('cassandane'); | ||
|
||
# perform the three way rename | ||
$mtalk = $self->{master_store}->get_client(); | ||
$mtalk->rename('INBOX.Foo', 'Inbox.Foo2'); | ||
$mtalk->rename('INBOX.Bar', 'Inbox.Foo'); | ||
$mtalk->rename('INBOX.Foo2', 'Inbox.Bar'); | ||
|
||
# replicate and check that it syncs ok | ||
$self->run_replication(rolling => 1, inputfile => $synclogfname); | ||
unlink($synclogfname); | ||
$self->check_replication('cassandane'); | ||
} |