]> git.proxmox.com Git - ceph.git/blame - ceph/src/test/cls_sdk/test_cls_sdk.cc
update sources to ceph Nautilus 14.2.1
[ceph.git] / ceph / src / test / cls_sdk / test_cls_sdk.cc
CommitLineData
7c673cae
FG
1#include <iostream>
2#include <errno.h>
3
11fdf7f2 4#include "test/librados/test_cxx.h"
7c673cae
FG
5#include "gtest/gtest.h"
6
7using namespace librados;
8
9TEST(ClsSDK, TestSDKCoverageWrite) {
10 Rados cluster;
11 std::string pool_name = get_temp_pool_name();
12 ASSERT_EQ("", create_one_pool_pp(pool_name, cluster));
13 IoCtx ioctx;
14 cluster.ioctx_create(pool_name.c_str(), ioctx);
15
16 bufferlist in, out;
17 ASSERT_EQ(0, ioctx.exec("myobject", "sdk", "test_coverage_write", in, out));
18
19 ASSERT_EQ(0, destroy_one_pool_pp(pool_name, cluster));
20}
21
22TEST(ClsSDK, TestSDKCoverageReplay) {
23 Rados cluster;
24 std::string pool_name = get_temp_pool_name();
25 ASSERT_EQ("", create_one_pool_pp(pool_name, cluster));
26 IoCtx ioctx;
27 cluster.ioctx_create(pool_name.c_str(), ioctx);
28
29 bufferlist in, out;
30 ASSERT_EQ(0, ioctx.exec("myobject", "sdk", "test_coverage_write", in, out));
31 ASSERT_EQ(0, ioctx.exec("myobject", "sdk", "test_coverage_replay", in, out));
32
33 ASSERT_EQ(0, destroy_one_pool_pp(pool_name, cluster));
34}
35