446 |
|
|
447 |
class FinalSelection(PathSetter): |
class FinalSelection(PathSetter): |
448 |
"""Test selection options""" |
"""Test selection options""" |
449 |
def run(self, cmd): |
def system(self, cmd): |
450 |
print "Executing: ", cmd |
print "Executing: ", cmd |
451 |
assert not os.system(cmd) |
assert not os.system(cmd) |
452 |
|
|
456 |
|
|
457 |
# Test --include option |
# Test --include option |
458 |
assert not \ |
assert not \ |
459 |
os.system(self.rb_schema + |
self.system(self.rb_schema + |
460 |
"--current-time 10000 " |
"--current-time 10000 " |
461 |
"--include testfiles/increment2/various_file_types " |
"--include testfiles/increment2/various_file_types " |
462 |
"--exclude '**' " |
"--exclude '**' " |
485 |
# Test selective restoring |
# Test selective restoring |
486 |
mirror_rp = rpath.RPath(Globals.local_connection, "testfiles/output") |
mirror_rp = rpath.RPath(Globals.local_connection, "testfiles/output") |
487 |
restore_filename = get_increment_rp(mirror_rp, 10000).path |
restore_filename = get_increment_rp(mirror_rp, 10000).path |
488 |
self.run(self.rb_schema + |
self.system(self.rb_schema + |
489 |
"--include testfiles/restoretarget1/various_file_types/" |
"--include testfiles/restoretarget1/various_file_types/" |
490 |
"regular_file " |
"regular_file " |
491 |
"--exclude '**' " + |
"--exclude '**' " + |
492 |
restore_filename + " testfiles/restoretarget1") |
restore_filename + " testfiles/restoretarget1") |
493 |
assert os.lstat("testfiles/restoretarget1/various_file_types/" |
assert os.lstat("testfiles/restoretarget1/various_file_types/" |
494 |
"regular_file") |
"regular_file") |
495 |
self.assertRaises(OSError, os.lstat, "testfiles/restoretarget1/tester") |
self.assertRaises(OSError, os.lstat, "testfiles/restoretarget1/tester") |