summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorChris Wilson <chris+github@qwirx.com>2014-02-27 23:35:14 +0000
committerChris Wilson <chris+github@qwirx.com>2014-02-27 23:35:14 +0000
commitfd4c6a9fbbd6bb9999931ae6b079dd073f0ab3b0 (patch)
tree2a9b9435909d0cf45fdcd4ffc8f776f36fe62c83
parent73f20fe6a2664d65aef1dd6f274ebc37760876f4 (diff)
Test that deleting a directory doesn't leave errors in the store.
If it fails to clear the reference counts properly, it will leave objects still existing, and checking the account will reattach them.
-rw-r--r--test/backupstore/testbackupstore.cpp8
1 files changed, 8 insertions, 0 deletions
diff --git a/test/backupstore/testbackupstore.cpp b/test/backupstore/testbackupstore.cpp
index 35a46138..12a353c3 100644
--- a/test/backupstore/testbackupstore.cpp
+++ b/test/backupstore/testbackupstore.cpp
@@ -1601,12 +1601,20 @@ bool test_multiple_uploads()
apProtocol = test_server_login("localhost", context, conn);
// And delete them
+ BackupProtocolLocal2 protocolLocal(0x01234567, "test",
+ "backup/01234567/", 0, false); // Not read-only
+ apProtocol = &protocolLocal;
+
{
std::auto_ptr<BackupProtocolSuccess> dirdel(apProtocol->QueryDeleteDirectory(
dirtodelete));
TEST_THAT(dirdel->GetObjectID() == dirtodelete);
}
+ protocolLocal.QueryFinished();
+ TEST_THAT(run_housekeeping_and_check_account());
+ TEST_THAT(check_reference_counts());
+
// Get the root dir, checking for deleted items
{
// Command