From: Sage Weil Date: Fri, 5 Jun 2015 19:17:26 +0000 (-0700) Subject: unittest_crush_wrapper: attach buckets to root in adjust_item_weight test X-Git-Tag: v0.94.4~61^2~4 X-Git-Url: http://git-server-git.apps.pok.os.sepia.ceph.com/?a=commitdiff_plain;h=0ccdf342e7cf0072d3c38c6e1a6cf3a87f154a28;p=ceph.git unittest_crush_wrapper: attach buckets to root in adjust_item_weight test Signed-off-by: Sage Weil (cherry picked from commit a8351eb3de2b4069ffec9c4f561eb1519ea11aa2) --- diff --git a/src/test/crush/CrushWrapper.cc b/src/test/crush/CrushWrapper.cc index 8b80f88052c4..e6928e073dad 100644 --- a/src/test/crush/CrushWrapper.cc +++ b/src/test/crush/CrushWrapper.cc @@ -408,6 +408,10 @@ TEST(CrushWrapper, adjust_item_weight) { EXPECT_EQ(true, c->bucket_exists(bucket_id)); EXPECT_EQ(host_weight, c->get_bucket_weightf(bucket_id)); + map bloc; + bloc["root"] = "default"; + EXPECT_EQ(0, c->insert_item(g_ceph_context, host0, host_weight, + HOST0, bloc)); } { @@ -426,6 +430,11 @@ TEST(CrushWrapper, adjust_item_weight) { bucket_id = c->get_item_id("fake"); EXPECT_EQ(true, c->bucket_exists(bucket_id)); EXPECT_EQ(host_weight, c->get_bucket_weightf(bucket_id)); + + map bloc; + bloc["root"] = "default"; + EXPECT_EQ(0, c->insert_item(g_ceph_context, hostfake, host_weight, + FAKE, bloc)); } //