From fd4c6a9fbbd6bb9999931ae6b079dd073f0ab3b0 Mon Sep 17 00:00:00 2001 From: Chris Wilson Date: Thu, 27 Feb 2014 23:35:14 +0000 Subject: 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. --- test/backupstore/testbackupstore.cpp | 8 ++++++++ 1 file changed, 8 insertions(+) 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 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 -- cgit v1.2.3