]> git.proxmox.com Git - ceph.git/blobdiff - ceph/src/test/librbd/object_map/test_mock_UpdateRequest.cc
update sources to ceph Nautilus 14.2.1
[ceph.git] / ceph / src / test / librbd / object_map / test_mock_UpdateRequest.cc
index 8bffd7212c7a28cd14f6f263633ab8d56f87cf9f..b7de4d1868ea83386aaf5c56a4423ef1884ccb4e 100644 (file)
@@ -9,6 +9,7 @@
 #include "librbd/internal.h"
 #include "librbd/ObjectMap.h"
 #include "librbd/Operations.h"
+#include "librbd/api/Image.h"
 #include "librbd/object_map/UpdateRequest.h"
 #include "gmock/gmock.h"
 #include "gtest/gtest.h"
@@ -29,10 +30,10 @@ public:
                      uint8_t new_state,
                      const boost::optional<uint8_t>& current_state, int r) {
     bufferlist bl;
-    ::encode(start_object_no, bl);
-    ::encode(end_object_no, bl);
-    ::encode(new_state, bl);
-    ::encode(current_state, bl);
+    encode(start_object_no, bl);
+    encode(end_object_no, bl);
+    encode(new_state, bl);
+    encode(current_state, bl);
 
     std::string oid(ObjectMap<>::object_map_name(ictx->id, snap_id));
     if (snap_id == CEPH_NOSNAP) {
@@ -129,9 +130,9 @@ TEST_F(TestMockObjectMapUpdateRequest, UpdateSnapOnDisk) {
   librbd::ImageCtx *ictx;
   ASSERT_EQ(0, open_image(m_image_name, &ictx));
   ASSERT_EQ(0, snap_create(*ictx, "snap1"));
-  ASSERT_EQ(0, librbd::snap_set(ictx,
-                               cls::rbd::UserSnapshotNamespace(),
-                               "snap1"));
+  ASSERT_EQ(0, librbd::api::Image<>::snap_set(ictx,
+                                             cls::rbd::UserSnapshotNamespace(),
+                                             "snap1"));
 
   uint64_t snap_id = ictx->snap_id;
   expect_update(ictx, snap_id, 0, 1, OBJECT_NONEXISTENT, OBJECT_EXISTS, 0);