diff options
author | ben <ben@2b77aa54-bcbc-44c9-a7ec-4f6cf2b41109> | 2002-07-16 05:16:42 +0000 |
---|---|---|
committer | ben <ben@2b77aa54-bcbc-44c9-a7ec-4f6cf2b41109> | 2002-07-16 05:16:42 +0000 |
commit | 4c8440ee71ba819c7327913870a615186ef8d386 (patch) | |
tree | 5d4d811680e1b3fd0a3393de3d49eb9cae116481 /rdiff-backup/testing/finaltest.py | |
parent | 6efc3610e37994c38a70cf32266e1e495035fbd3 (diff) | |
download | rdiff-backup-4c8440ee71ba819c7327913870a615186ef8d386.tar.gz |
Various changes to 0.9.3, see CHANGELOG
git-svn-id: http://svn.savannah.nongnu.org/svn/rdiff-backup/trunk@157 2b77aa54-bcbc-44c9-a7ec-4f6cf2b41109
Diffstat (limited to 'rdiff-backup/testing/finaltest.py')
-rw-r--r-- | rdiff-backup/testing/finaltest.py | 31 |
1 files changed, 31 insertions, 0 deletions
diff --git a/rdiff-backup/testing/finaltest.py b/rdiff-backup/testing/finaltest.py index 0a51485..43daef6 100644 --- a/rdiff-backup/testing/finaltest.py +++ b/rdiff-backup/testing/finaltest.py @@ -17,6 +17,7 @@ class Local: def get_local_rp(extension): return RPath(Globals.local_connection, "testfiles/" + extension) + vftrp = get_local_rp('various_file_types') inc1rp = get_local_rp('increment1') inc2rp = get_local_rp('increment2') inc3rp = get_local_rp('increment3') @@ -71,6 +72,19 @@ class PathSetter(unittest.TestCase): print "executing " + cmdstr assert not os.system(cmdstr) + def exec_rb_extra_args(self, time, extra_args, *args): + """Run rdiff-backup on given arguments""" + arglist = [] + if time: arglist.append("--current-time %s" % str(time)) + arglist.append(self.src_prefix + args[0]) + if len(args) > 1: + arglist.append(self.dest_prefix + args[1]) + assert len(args) == 2 + + cmdstr = "%s %s %s" % (self.rb_schema, extra_args, ' '.join(arglist)) + print "executing " + cmdstr + assert not os.system(cmdstr) + def exec_rb_restore(self, time, *args): """Restore using rdiff-backup's new syntax and given time""" arglist = [] @@ -174,6 +188,23 @@ class Final(PathSetter): self.set_connections("test1/", '../', 'test2/tmp/', '../../') self.runtest() + def testMirroringLocal(self): + """Run mirroring only everything remote""" + self.delete_tmpdirs() + self.set_connections(None, None, None, None) + self.exec_rb_extra_args(10000, "-m", + "testfiles/various_file_types", + "testfiles/output") + assert CompareRecursive(Local.vftrp, Local.rpout, exclude_rbdir = None) + + def testMirroringRemote(self): + """Run mirroring only everything remote""" + self.delete_tmpdirs() + self.set_connections("test1/", "../", "test2/tmp/", "../../") + self.exec_rb_extra_args(10000, "-m", + "testfiles/various_file_types", + "testfiles/output") + assert CompareRecursive(Local.vftrp, Local.rpout, exclude_rbdir = None) class FinalSelection(PathSetter): """Test selection options""" |