]> git.apps.os.sepia.ceph.com Git - ceph.git/commitdiff
ceph_test_objectstore: clean up on finish of MoveRename
authorSage Weil <sage@redhat.com>
Tue, 22 Jul 2014 13:53:41 +0000 (06:53 -0700)
committerSamuel Just <sam.just@inktank.com>
Sun, 3 Aug 2014 19:47:10 +0000 (12:47 -0700)
Otherwise, we leave collections around, and the next test fails.

Signed-off-by: Sage Weil <sage@redhat.com>
(cherry picked from commit d4faf747b73e70dff9cb5c98ee6aaa4ecec215fc)

src/test/objectstore/store_test.cc

index cd34f6d804f93aabf957cbc51e060b7b06334639..7c5dc58300601c7027320c6018d6fa88a1a7328d 100644 (file)
@@ -1115,6 +1115,14 @@ TEST_P(StoreTest, MoveRename) {
     ASSERT_TRUE(newomap.count("omap_key"));
     ASSERT_TRUE(newomap["omap_key"].contents_equal(omap["omap_key"]));
   }
+  {
+    ObjectStore::Transaction t;
+    t.remove(cid, oid);
+    t.remove_collection(cid);
+    t.remove_collection(temp_cid);
+    r = store->apply_transaction(t);
+    ASSERT_EQ(r, 0);
+  }
 }
 
 TEST_P(StoreTest, BigRGWObjectName) {