]> git.apps.os.sepia.ceph.com Git - ceph.git/commitdiff
src/test/objectstore/store_test.cc: fix shards for new tests 9277/head
authorSamuel Just <sjust@redhat.com>
Thu, 12 May 2016 20:50:58 +0000 (13:50 -0700)
committerSamuel Just <sjust@redhat.com>
Thu, 12 May 2016 20:50:58 +0000 (13:50 -0700)
This didn't matter on master/jewel, but in hammer, keyvaluestore
asserts that gen != NO_GEN => shard != NO_SHARD.

Signed-off-by: Samuel Just <sjust@redhat.com>
src/test/objectstore/store_test.cc

index 227e2e397c0050e6ce8c1f3bcf8d50796793f475..d4444443356811325eca89b6a4832cd26b242a4e 100644 (file)
@@ -374,6 +374,7 @@ TEST_P(StoreTest, LongnameSplitTest) {
   ghobject_t test_obj = generate_long_name(319);
   ghobject_t test_obj_2 = test_obj;
   test_obj_2.generation = 0;
+  test_obj_2.shard_id = shard_id_t(0);
   {
     ObjectStore::Transaction t;
     // should cause a split
@@ -741,6 +742,7 @@ public:
     available_objects.erase(old_obj);
     ghobject_t new_obj = old_obj;
     new_obj.generation++;
+    new_obj.shard_id = shard_id_t(0);
     available_objects.erase(new_obj);
 
     ObjectStore::Transaction *t = new ObjectStore::Transaction;