cyrus-imapd/patch-cassandane-rename-quota

121 lines
4.7 KiB
Plaintext
Raw Normal View History

diff --git a/Cassandane/Cyrus/Quota.pm b/Cassandane/Cyrus/Quota.pm
index b231eda..893e141 100644
--- a/Cassandane/Cyrus/Quota.pm
+++ b/Cassandane/Cyrus/Quota.pm
@@ -1000,7 +1000,7 @@ sub test_quota_f_unixhs
my @data = $self->{instance}->run_command({
cyrus => 1,
redirects => { stdout => $self->{instance}{basedir} . '/quota.out' },
- }, 'quota', '-f');
+ }, 'cyr_quota', '-f');
open(FH, "<", $self->{instance}{basedir} . '/quota.out');
local $/ = undef;
@@ -1095,7 +1095,7 @@ sub test_quota_f
);
xlog "find and add the quota";
- $self->{instance}->run_command({ cyrus => 1 }, 'quota', '-f');
+ $self->{instance}->run_command({ cyrus => 1 }, 'cyr_quota', '-f');
xlog "check usages";
$self->_check_usages(
@@ -1112,7 +1112,7 @@ sub test_quota_f
);
xlog "re-run the quota utility";
- $self->{instance}->run_command({ cyrus => 1 }, 'quota', '-f');
+ $self->{instance}->run_command({ cyrus => 1 }, 'cyr_quota', '-f');
xlog "check usages";
$self->_check_usages(
@@ -1165,7 +1165,7 @@ sub test_quota_f_vs_update
$self->{instance}->quota_Z_go("$basefolder.a");
$self->{instance}->quota_Z_go("$basefolder.b");
my (@bits) = $self->{instance}->run_command({ cyrus => 1, background => 1 },
- 'quota', '-Z', '-f', $basefolder);
+ 'cyr_quota', '-Z', '-f', $basefolder);
# waiting for quota -f to ensure that
# a) the -Z mechanism is working and
@@ -1248,14 +1248,14 @@ sub test_quota_f_nested_qr
$self->_check_usages(quotaroot => "$inbox.nnn", storage => 0);
xlog "run quota -f to find and add the quota";
- $self->{instance}->run_command({ cyrus => 1 }, 'quota', '-f');
+ $self->{instance}->run_command({ cyrus => 1 }, 'cyr_quota', '-f');
xlog "check that STORAGE quota is restored for both roots";
$self->_check_usages(quotaroot => $inbox, storage => int($ex1/1024));
$self->_check_usages(quotaroot => "$inbox.nnn", storage => int($ex2/1024));
xlog "run quota -f again";
- $self->{instance}->run_command({ cyrus => 1 }, 'quota', '-f');
+ $self->{instance}->run_command({ cyrus => 1 }, 'cyr_quota', '-f');
xlog "check that STORAGE quota is still correct for both roots";
$self->_check_usages(quotaroot => $inbox, storage => int($ex1/1024));
@@ -1330,7 +1330,7 @@ sub test_quota_f_prefix
storage => int($exp_baseplus/1024));
xlog "Run quota -f";
- $self->{instance}->run_command({ cyrus => 1 }, 'quota', '-f');
+ $self->{instance}->run_command({ cyrus => 1 }, 'cyr_quota', '-f');
xlog "Check that the quotas were unchanged by quota -f";
$self->_check_usages(quotaroot => 'user.base',
@@ -1353,7 +1353,7 @@ sub test_quota_f_prefix
storage => int($bogus_baseplus/1024));
xlog "Run quota -f with no prefix";
- $self->{instance}->run_command({ cyrus => 1 }, 'quota', '-f');
+ $self->{instance}->run_command({ cyrus => 1 }, 'cyr_quota', '-f');
xlog "Check that the quotas were all fixed";
$self->_check_usages(quotaroot => 'user.base',
@@ -1374,7 +1374,7 @@ sub test_quota_f_prefix
storage => int($bogus_baseplus/1024));
xlog "Run quota -f on user.base only";
- $self->{instance}->run_command({ cyrus => 1 }, 'quota', '-f', 'user.base');
+ $self->{instance}->run_command({ cyrus => 1 }, 'cyr_quota', '-f', 'user.base');
xlog "Check that only the user.base and user.baseplus quotas were fixed";
$self->_check_usages(quotaroot => 'user.base',
@@ -1395,7 +1395,7 @@ sub test_quota_f_prefix
storage => int($bogus_baseplus/1024));
xlog "Run quota -f on user.baseplus only";
- $self->{instance}->run_command({ cyrus => 1 }, 'quota', '-f', 'user.baseplus');
+ $self->{instance}->run_command({ cyrus => 1 }, 'cyr_quota', '-f', 'user.baseplus');
xlog "Check that only the user.baseplus quotas were fixed";
$self->_check_usages(quotaroot => 'user.base',
@@ -2384,7 +2384,7 @@ sub test_reconstruct
'reconstruct', 'user.cassandane');
xlog "Running quota -f";
$self->{instance}->run_command({ cyrus => 1 },
- 'quota', '-f', "user.cassandane");
+ 'cyr_quota', '-f', "user.cassandane");
$talk = $store->get_client();
@@ -2520,7 +2520,7 @@ sub test_reconstruct_orphans
'reconstruct', 'user.cassandane');
xlog "Running quota -f";
$self->{instance}->run_command({ cyrus => 1 },
- 'quota', '-f', "user.cassandane");
+ 'cyr_quota', '-f', "user.cassandane");
$talk = $store->get_client();
@@ -2566,7 +2566,7 @@ sub test_bug3735
$self->{instance}->run_command({
cyrus => 1,
redirects => { stdout => $filename },
- }, 'quota', "user.a");
+ }, 'cyr_quota', "user.a");
open RESULTS, '<', $filename
or die "Cannot open $filename for reading: $!";