]> git.apps.os.sepia.ceph.com Git - ceph.git/commitdiff
test_filestore_idempotent: fix test to create initial object
authorSage Weil <sage.weil@dreamhost.com>
Tue, 14 Feb 2012 19:53:05 +0000 (11:53 -0800)
committerSage Weil <sage.weil@dreamhost.com>
Tue, 14 Feb 2012 19:53:05 +0000 (11:53 -0800)
Filestore now properly fails to clone a non-existent object, which means
we should create one.

Fixes: #2062
Signed-off-by: Sage Weil <sage.weil@dreamhost.com>
src/test/test_filestore_idempotent.cc

index a4aafa7da66d343404fde84655cdfb393e4d6939..ad546da0bef6ba498a2c5a1091489e3ec35789ab 100644 (file)
@@ -80,6 +80,12 @@ int main(int argc, const char **argv)
 
     ObjectStore::Transaction ft;
     ft.create_collection(coll);
+    {
+      uint64_t x = 0;
+      bufferlist bl;
+      ::encode(x, bl);
+      ft.write(coll, oid, 0, bl.length(), bl);
+    }
     fs->apply_transaction(ft);
 
     uint64_t size = 4096;