From 51910f04a28f0f1003b5d8d8dcf99284966c45cc Mon Sep 17 00:00:00 2001 From: Sage Weil Date: Thu, 1 Sep 2016 12:04:27 -0400 Subject: [PATCH] ceph_test_objectstore: clean up Rename test a bit Drop useless remove calls. Leave in the no-op setattr call since it triggered a bluestore bug :) Signed-off-by: Sage Weil --- src/test/objectstore/store_test.cc | 6 ++---- 1 file changed, 2 insertions(+), 4 deletions(-) diff --git a/src/test/objectstore/store_test.cc b/src/test/objectstore/store_test.cc index 3d31717805a..0207b9ebc65 100644 --- a/src/test/objectstore/store_test.cc +++ b/src/test/objectstore/store_test.cc @@ -4668,7 +4668,6 @@ TEST_P(StoreTest, Rename) { { ObjectStore::Transaction t; t.collection_move_rename(cid, srcoid, cid, dstoid); - t.remove(cid, srcoid); t.write(cid, srcoid, 0, b.length(), b); t.setattr(cid, srcoid, "attr", b); r = apply_transaction(store, &osr, std::move(t)); @@ -4687,12 +4686,12 @@ TEST_P(StoreTest, Rename) { ObjectStore::Transaction t; t.remove(cid, dstoid); t.collection_move_rename(cid, srcoid, cid, dstoid); - t.remove(cid, srcoid); - t.setattr(cid, srcoid, "attr", a); + t.setattr(cid, srcoid, "attr", a); // note: this is a no-op r = apply_transaction(store, &osr, std::move(t)); ASSERT_EQ(r, 0); } ASSERT_TRUE(store->exists(cid, dstoid)); + ASSERT_FALSE(store->exists(cid, srcoid)); { bufferlist bl; store->read(cid, dstoid, 0, 3, bl); @@ -4701,7 +4700,6 @@ TEST_P(StoreTest, Rename) { { ObjectStore::Transaction t; t.remove(cid, dstoid); - t.remove(cid, srcoid); t.remove_collection(cid); r = apply_transaction(store, &osr, std::move(t)); ASSERT_EQ(r, 0); -- 2.39.5