]> git.apps.os.sepia.ceph.com Git - ceph.git/commit
unit test LFNIndex::remove_object and LFNIndex::lfn_unlink 161/head
authorLoic Dachary <loic@dachary.org>
Thu, 28 Mar 2013 12:38:09 +0000 (13:38 +0100)
committerLoic Dachary <loic@dachary.org>
Fri, 29 Mar 2013 08:46:14 +0000 (09:46 +0100)
commit972f0eb0acec9dfdc677cc1478cf86da7c51e6ab
tree73f0c65aefa7c0a17718b3fe8f9066a10ed64072
parentc8ac1ee9f898fdb7c5b60f29760f756a487904de
unit test LFNIndex::remove_object and LFNIndex::lfn_unlink

When the object name is short, check that the corresponding file is
::unlink()ed. When the object name is long, there may be multiple files
with the same name, modulo the anti-collision number showing just before
the FILENAME_COOKIE. The following scenarii are tested:

 * there only is one file

 * there are multiple files and the last one is removed

 * there are multiple files and the last one is moved in place of the
   file that is to be removed

lfn_unlink and remove_object are tested together because
lfn_unlink is a private function and remove_object is a protected function
that does very little beside calling lfn_unlink

http://tracker.ceph.com/issues/4560 refs #4560

Signed-off-by: Loic Dachary <loic@dachary.org>
src/test/os/TestLFNIndex.cc