summaryrefslogtreecommitdiff
path: root/test/backupstore
diff options
context:
space:
mode:
authorChris Wilson <chris+github@qwirx.com>2015-08-15 10:57:59 +0000
committerChris Wilson <chris+github@qwirx.com>2015-08-15 10:57:59 +0000
commitfeade829d345bd6e34f39dfc32498696e6f588a1 (patch)
tree84faf18ef5e1cc9c9bd6eba36946db6a7dfff0f2 /test/backupstore
parent62c0689012de2786ed2fae3da84b5301d6b49a55 (diff)
Improve exception handling on backup store side.
Add a new exception code to represent an object being completely missing (not found on the store at all), separate from not being found in a particular directory. Improve mapping of server-side exceptions to protocol error messages returned to the client. Add handling for missing exceptions, such as BackupStoreException::PatchChainInfoBadInDirectory, and the new BackupStoreException::ObjectDoesNotExist. Fix mapping for BackupStoreException::CouldNotFindEntryInDirectory to make it distinguistable from BackupStoreException::ObjectDoesNotExist.
Diffstat (limited to 'test/backupstore')
-rw-r--r--test/backupstore/testbackupstore.cpp8
1 files changed, 4 insertions, 4 deletions
diff --git a/test/backupstore/testbackupstore.cpp b/test/backupstore/testbackupstore.cpp
index f30fd42a..c3798bf2 100644
--- a/test/backupstore/testbackupstore.cpp
+++ b/test/backupstore/testbackupstore.cpp
@@ -1723,7 +1723,7 @@ bool test_server_commands()
BACKUPSTORE_ROOT_DIRECTORY_ID, subdirid,
BackupProtocolMoveObject::Flags_MoveAllWithSameName,
newName),
- Err_DoesNotExist);
+ Err_DoesNotExistInDirectory);
BackupStoreFilenameClear newName("moved-files");
TEST_COMMAND_RETURNS_ERROR(*apProtocol,
QueryMoveObject(
@@ -1732,7 +1732,7 @@ bool test_server_commands()
subdirid,
BackupProtocolMoveObject::Flags_MoveAllWithSameName,
newName),
- Err_DoesNotExist);
+ Err_DoesNotExistInDirectory);
TEST_COMMAND_RETURNS_ERROR(*apProtocol,
QueryMoveObject(
uploads[UPLOAD_FILE_TO_MOVE].allocated_objid,
@@ -1740,7 +1740,7 @@ bool test_server_commands()
subdirid,
BackupProtocolMoveObject::Flags_MoveAllWithSameName,
newName),
- Err_DoesNotExist);
+ Err_DoesNotExistInDirectory);
}
// File exists, but not in this directory (we just moved it)
@@ -1750,7 +1750,7 @@ bool test_server_commands()
subdirid,
BackupProtocolMoveObject::Flags_MoveAllWithSameName,
newName),
- Err_DoesNotExist);
+ Err_DoesNotExistInDirectory);
// Moving file to same directory that it's already in,
// with the same name