summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorbescoto <bescoto@2b77aa54-bcbc-44c9-a7ec-4f6cf2b41109>2005-08-20 06:31:18 +0000
committerbescoto <bescoto@2b77aa54-bcbc-44c9-a7ec-4f6cf2b41109>2005-08-20 06:31:18 +0000
commita5dbd43d25339008dacfc7a1b2342589d24adf42 (patch)
treec5d3366f98b996f9ee3470fcd79605bac22bbf27
parent420600f59943b8fd20a3cc6853b1d6e7a1bb2bb1 (diff)
downloadrdiff-backup-a5dbd43d25339008dacfc7a1b2342589d24adf42.tar.gz
Oops, last patch broke remote --remove-older-than, fix and test here
git-svn-id: http://svn.savannah.nongnu.org/svn/rdiff-backup/trunk@626 2b77aa54-bcbc-44c9-a7ec-4f6cf2b41109
-rw-r--r--rdiff-backup/rdiff_backup/Security.py2
-rw-r--r--rdiff-backup/testing/finaltest.py18
2 files changed, 19 insertions, 1 deletions
diff --git a/rdiff-backup/rdiff_backup/Security.py b/rdiff-backup/rdiff_backup/Security.py
index efd8f04..1159108 100644
--- a/rdiff-backup/rdiff_backup/Security.py
+++ b/rdiff-backup/rdiff_backup/Security.py
@@ -173,7 +173,7 @@ def set_allowed_requests(sec_level):
"restore.TargetStruct.get_initial_iter",
"restore.TargetStruct.patch",
"restore.TargetStruct.set_target_select",
- "regress.Regress"])
+ "regress.Regress", "manage.delete_earlier_than_local"])
if Globals.server:
l.extend(["SetConnections.init_connection_remote",
"log.Log.setverbosity", "log.Log.setterm_verbosity",
diff --git a/rdiff-backup/testing/finaltest.py b/rdiff-backup/testing/finaltest.py
index 52319d7..65f38e5 100644
--- a/rdiff-backup/testing/finaltest.py
+++ b/rdiff-backup/testing/finaltest.py
@@ -377,6 +377,12 @@ class FinalMisc(PathSetter):
self.exec_rb_extra_args(None, "--list-increment-sizes",
"testfiles/restoretest3")
+ def testListIncrementSizesRemote(self):
+ """Test --list-increment-sizes switch. Uses restoretest3"""
+ self.set_connections('test1', '../', None, None)
+ self.exec_rb_extra_args(None, "--list-increment-sizes",
+ "testfiles/restoretest3")
+
def testListIncrementsRemote(self):
"""Test --list-increment-sizes mode remotely. Uses restoretest3"""
self.set_connections('test1', '../', None, None)
@@ -427,6 +433,18 @@ class FinalMisc(PathSetter):
"testfiles/increment1", "testfiles/output")
self.exec_rb_extra_args(None, "--remove-older-than now", "testfiles/output")
+ def testRemoveOlderThanRemote(self):
+ """Test --remove-older-than remotely"""
+ Myrm("testfiles/output")
+ assert not os.system("cp -a testfiles/restoretest3 testfiles/output")
+ self.set_connections("test1/", "../", None, None)
+ self.exec_rb_extra_args(None, "--remove-older-than 20000",
+ "testfiles/output")
+ rbdir = rpath.RPath(Globals.local_connection,
+ "testfiles/output/rdiff-backup-data")
+ for inc in self.get_all_increments(rbdir):
+ assert inc.getinctime() >= 20000
+
def testCompare(self):
"""Test --compare and --compare-older-than modes"""
Myrm("testfiles/output")