]> git.apps.os.sepia.ceph.com Git - ceph.git/commitdiff
cls/rbd: add snapshot limit UINT64_MAX test case 31350/head
authorchenpan <chenpan@cmss.chinamobile.com>
Mon, 4 Nov 2019 09:20:56 +0000 (17:20 +0800)
committerchenpan <chenpan@cmss.chinamobile.com>
Tue, 5 Nov 2019 02:07:13 +0000 (10:07 +0800)
Signed-off-by: Chen Pan <chenpan@cmss.chinamobile.com>
src/test/cls_rbd/test_cls_rbd.cc

index 04aeefe9b7ab6b2b3fc46d37493ff20e0fad9137..30e4affbda9419fea109032d2bc54e66af685c6a 100644 (file)
@@ -723,6 +723,10 @@ TEST_F(TestClsRbd, snapshot_limits)
 
   ASSERT_EQ(0, create_image(&ioctx, oid, 0, 22, RBD_FEATURE_LAYERING, oid, -1));
 
+  // if snapshot doesn't set limit, the limit is UINT64_MAX
+  ASSERT_EQ(0, snapshot_get_limit(&ioctx, oid, &limit));
+  ASSERT_EQ(UINT64_MAX, limit);
+
   snapshot_set_limit(&op, 2);
 
   ASSERT_EQ(0, ioctx.operate(oid, &op));