summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorben <ben@2b77aa54-bcbc-44c9-a7ec-4f6cf2b41109>2002-05-15 00:25:45 +0000
committerben <ben@2b77aa54-bcbc-44c9-a7ec-4f6cf2b41109>2002-05-15 00:25:45 +0000
commitfb5cc96e5f2727e14a923fa3d8f4d052d9ba2867 (patch)
treec318529ddb2f9e932b5daf4d4a5edb34d04378f1
parent62399345db69c91b455d27413536ef10ce2d847f (diff)
downloadrdiff-backup-fb5cc96e5f2727e14a923fa3d8f4d052d9ba2867.tar.gz
Added test for --exclude-filelist when source remote.
git-svn-id: http://svn.savannah.nongnu.org/svn/rdiff-backup/trunk@86 2b77aa54-bcbc-44c9-a7ec-4f6cf2b41109
-rw-r--r--rdiff-backup/testing/finaltest.py48
1 files changed, 47 insertions, 1 deletions
diff --git a/rdiff-backup/testing/finaltest.py b/rdiff-backup/testing/finaltest.py
index 909d1a6..add827f 100644
--- a/rdiff-backup/testing/finaltest.py
+++ b/rdiff-backup/testing/finaltest.py
@@ -39,8 +39,11 @@ class Local:
class PathSetter(unittest.TestCase):
def setUp(self):
+ self.reset_schema()
+
+ def reset_schema(self):
self.rb_schema = SourceDir + \
- "/rdiff-backup -v5 --remote-schema './chdir-wrapper %s' "
+ "/rdiff-backup -v5 --remote-schema './chdir-wrapper %s' "
def refresh(self, *rp_list):
"""Reread data for the given rps"""
@@ -229,6 +232,49 @@ testfiles/increment2/changed_dir""")
self.assertRaises(OSError, os.lstat,
"testfiles/restoretarget2/various_file_types/executable")
+ def testSelFilesRemote(self):
+ """Test for bug found in 0.7.[34] - filelist where source remote"""
+ self.delete_tmpdirs()
+ self.set_connections("test1/", "../", 'test2/tmp/', '../../')
+ self.rb_schema += ("--exclude-filelist testfiles/vft_out/exclude "
+ "--include-filelist testfiles/vft_out/include "
+ "--exclude '**' ")
+
+ # Make an exclude list
+ os.mkdir("testfiles/vft_out")
+ excluderp = RPath(Globals.local_connection,
+ "testfiles/vft_out/exclude")
+ fp = excluderp.open("w")
+ fp.write("""
+../testfiles/various_file_types/regular_file
+../testfiles/various_file_types/test
+""")
+ assert not fp.close()
+
+ # Make an include list
+ includerp = RPath(Globals.local_connection,
+ "testfiles/vft_out/include")
+ fp = includerp.open("w")
+ fp.write("""
+../testfiles/various_file_types/executable
+../testfiles/various_file_types/symbolic_link
+../testfiles/various_file_types/regular_file
+../testfiles/various_file_types/test
+""")
+ assert not fp.close()
+
+ self.exec_rb(None, 'testfiles/various_file_types', 'testfiles/output')
+
+ self.reset_schema()
+ self.exec_rb_restore("now", 'testfiles/output',
+ 'testfiles/restoretarget1')
+ assert os.lstat('testfiles/restoretarget1/executable')
+ assert os.lstat('testfiles/restoretarget1/symbolic_link')
+ self.assertRaises(OSError, os.lstat,
+ 'testfiles/restoretarget1/regular_file')
+ self.assertRaises(OSError, os.lstat,
+ 'testfiles/restoretarget1/executable2')
+
class FinalCorrupt(PathSetter):
def testBackupOverlay(self):