[Box Backup-commit] COMMIT r1506 - box/chris/merge/test/bbackupd
boxbackup-dev@fluffy.co.uk
boxbackup-dev@fluffy.co.uk
Sun, 01 Apr 2007 13:44:46 +0100
Author: chris
Date: 2007-04-01 13:44:46 +0100 (Sun, 01 Apr 2007)
New Revision: 1506
Modified:
box/chris/merge/test/bbackupd/testbbackupd.cpp
Log:
Test for restoring to a directory whose parent does not exist
(refs #3, merges [517])
Modified: box/chris/merge/test/bbackupd/testbbackupd.cpp
===================================================================
--- box/chris/merge/test/bbackupd/testbbackupd.cpp 2007-03-25 15:53:39 UTC (rev 1505)
+++ box/chris/merge/test/bbackupd/testbbackupd.cpp 2007-04-01 12:44:46 UTC (rev 1506)
@@ -1353,6 +1353,13 @@
// Make sure you can't restore a restored directory
TEST_THAT(BackupClientRestore(protocol, restoredirid, "testfiles/restore-Test1", true /* print progress dots */) == Restore_TargetExists);
+ // Make sure you can't restore to a nonexistant path
+ printf("Try to restore to a path that doesn't exist\n");
+ TEST_THAT(BackupClientRestore(protocol, restoredirid,
+ "testfiles/no-such-path/subdir",
+ true /* print progress dots */)
+ == Restore_TargetPathNotFound);
+
// Find ID of the deleted directory
deldirid = GetDirID(protocol, "x1", restoredirid);
TEST_THAT(deldirid != 0);