Commit 5e07e132 authored by ben's avatar ben

Added test for --exclude-filelist when source remote.


git-svn-id: http://svn.savannah.nongnu.org/svn/rdiff-backup@86 2b77aa54-bcbc-44c9-a7ec-4f6cf2b41109
parent 9259a402
......@@ -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):
......
Markdown is supported
0%
or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment