]> git.proxmox.com Git - ceph.git/blobdiff - ceph/src/test/cls_rbd/test_cls_rbd.cc
update sources to v12.1.1
[ceph.git] / ceph / src / test / cls_rbd / test_cls_rbd.cc
index 6d0cc44ad551e88ce48ff9cc5561cbcd4dee659b..8ec0165cbb1e193767b2e063110daa764c8432de 100644 (file)
@@ -421,6 +421,21 @@ TEST_F(TestClsRbd, get_object_prefix)
   ioctx.close();
 }
 
+TEST_F(TestClsRbd, get_create_timestamp)
+{
+  librados::IoCtx ioctx;
+  ASSERT_EQ(0, _rados.ioctx_create(_pool_name.c_str(), ioctx));
+
+  string oid = get_temp_image_name();
+  ASSERT_EQ(0, create_image(&ioctx, oid, 0, 22, 0, oid, -1));
+
+  utime_t timestamp;
+  ASSERT_EQ(0, get_create_timestamp(&ioctx, oid, &timestamp));
+  ASSERT_LT(0U, timestamp.tv.tv_sec);
+
+  ioctx.close();
+}
+
 TEST_F(TestClsRbd, get_data_pool)
 {
   librados::IoCtx ioctx;