summaryrefslogtreecommitdiff
path: root/test/backupdiff
diff options
context:
space:
mode:
authorChris Wilson <chris+github@qwirx.com>2006-01-28 00:13:44 +0000
committerChris Wilson <chris+github@qwirx.com>2006-01-28 00:13:44 +0000
commit9e025fd0ea42782e93363958804c6e2437b44a30 (patch)
treefd37208fa3f569067e75ea24765c575d9884b339 /test/backupdiff
parent41f02c67b06ae838dc9fc8829741ed51abfe5b42 (diff)
* configure.ac
* bin/bbstored/backupprotocol.txt * bin/bbstored/BackupCommands.cpp * bin/bbackupd/BackupClientContext.cpp * bin/bbackupd/BackupClientContext.h * bin/bbackupd/BackupClientDirectoryRecord.cpp * bin/bbackupd/BackupDaemon.cpp * lib/backupclient/BackupStoreFileDiff.cpp * lib/backupclient/BackupDaemonConfigVerify.cpp * lib/backupclient/BackupStoreFile.h * test/backupstore/testbackupstore.cpp * test/backupstorepatch/testbackupstorepatch.cpp - Applied changes from chris/diff-timeout-and-ssl-keepalive * test/backupdiff/testbackupdiff.cpp - Fixed test to match new prototype for EncodeFileDiff
Diffstat (limited to 'test/backupdiff')
-rw-r--r--test/backupdiff/testbackupdiff.cpp28
1 files changed, 22 insertions, 6 deletions
diff --git a/test/backupdiff/testbackupdiff.cpp b/test/backupdiff/testbackupdiff.cpp
index 4408b69f..584dd70c 100644
--- a/test/backupdiff/testbackupdiff.cpp
+++ b/test/backupdiff/testbackupdiff.cpp
@@ -169,9 +169,17 @@ void test_diff(int from, int to, int new_blocks_expected, int old_blocks_expecte
{
BackupStoreFilenameClear f1name("filename");
FileStream out(to_diff, O_WRONLY | O_CREAT | O_EXCL);
- std::auto_ptr<IOStream> encoded(BackupStoreFile::EncodeFileDiff(to_orig, 1 /* dir ID */, f1name,
- 1000 + from /* object ID of the file diffing from */, blockindex, IOStream::TimeOutInfinite,
- 0, &completelyDifferent));
+ std::auto_ptr<IOStream> encoded(
+ BackupStoreFile::EncodeFileDiff(
+ to_orig,
+ 1 /* dir ID */,
+ f1name,
+ 1000 + from /* object ID of the file diffing from */,
+ blockindex,
+ IOStream::TimeOutInfinite,
+ NULL, // DiffTimer interface
+ 0,
+ &completelyDifferent));
encoded->CopyStreamTo(out);
}
TEST_THAT(completelyDifferent == expect_completely_different);
@@ -443,9 +451,17 @@ int test(int argc, const char *argv[])
BackupStoreFilenameClear f1name("filename");
FileStream out("testfiles/f2.symlink.diff", O_WRONLY | O_CREAT | O_EXCL);
- std::auto_ptr<IOStream> encoded(BackupStoreFile::EncodeFileDiff("testfiles/f2.symlink", 1 /* dir ID */, f1name,
- 1001 /* object ID of the file diffing from */, blockindex, IOStream::TimeOutInfinite,
- 0, &completelyDifferent));
+ std::auto_ptr<IOStream> encoded(
+ BackupStoreFile::EncodeFileDiff(
+ "testfiles/f2.symlink",
+ 1 /* dir ID */,
+ f1name,
+ 1001 /* object ID of the file diffing from */,
+ blockindex,
+ IOStream::TimeOutInfinite,
+ NULL, // DiffTimer interface
+ 0,
+ &completelyDifferent));
encoded->CopyStreamTo(out);
}
TEST_THAT(completelyDifferent == true);