]> git.apps.os.sepia.ceph.com Git - ceph.git/commitdiff
test: update test for when cache tier is not available
authorDeepika Upadhyay <dupadhya@redhat.com>
Wed, 23 Jun 2021 05:14:21 +0000 (10:44 +0530)
committerDeepika Upadhyay <dupadhya@redhat.com>
Fri, 20 Aug 2021 02:38:39 +0000 (08:08 +0530)
Signed-off-by: Deepika Upadhyay <dupadhya@redhat.com>
(cherry picked from commit e80a80c7d932ab60c5b31ad50c7b62d5fb0b37bc)

src/test/mon/PGMap.cc

index 7280601fc3ac22e69e25cb207c0afebc7f469edd..7566651323fe12730a94625a5c64ee9d94d75b22 100644 (file)
@@ -79,8 +79,9 @@ TEST(pgmap, dump_object_stat_sum_0)
   pool.quota_max_bytes = 2000 * 1024 * 1024;
   pool.size = 2;
   pool.type = pg_pool_t::TYPE_REPLICATED;
+  pool.tier_of = 0;
   PGMap::dump_object_stat_sum(tbl, nullptr, pool_stat, avail,
-                             pool.get_size(), verbose, true, true, &pool);  
+                             pool.get_size(), verbose, true, true, &pool);
   float copies_rate =
     (static_cast<float>(sum.num_object_copies - sum.num_objects_degraded) /
       sum.num_object_copies) * pool.get_size();
@@ -120,8 +121,9 @@ TEST(pgmap, dump_object_stat_sum_1)
   pool.quota_max_bytes = 2000 * 1024 * 1024;
   pool.size = 2;
   pool.type = pg_pool_t::TYPE_REPLICATED;
+  pool.tier_of = 0;
   PGMap::dump_object_stat_sum(tbl, nullptr, pool_stat, avail,
-                             pool.get_size(), verbose, true, true, &pool);  
+                             pool.get_size(), verbose, true, true, &pool);
   unsigned col = 0;
   ASSERT_EQ(stringify(byte_u_t(0)), tbl.get(0, col++));
   ASSERT_EQ(stringify(byte_u_t(0)), tbl.get(0, col++));