summaryrefslogtreecommitdiffstats
path: root/src/test/librbd/test_mock_fixture.h
diff options
context:
space:
mode:
Diffstat (limited to 'src/test/librbd/test_mock_fixture.h')
-rw-r--r--src/test/librbd/test_mock_fixture.h13
1 files changed, 4 insertions, 9 deletions
diff --git a/src/test/librbd/test_mock_fixture.h b/src/test/librbd/test_mock_fixture.h
index 6146a368610..c0bbb3d2536 100644
--- a/src/test/librbd/test_mock_fixture.h
+++ b/src/test/librbd/test_mock_fixture.h
@@ -12,7 +12,8 @@
#include <gmock/gmock.h>
namespace librados {
-class TestRadosClient;
+class TestCluster;
+class MockTestMemCluster;
class MockTestMemIoCtxImpl;
class MockTestMemRadosClient;
}
@@ -59,18 +60,13 @@ MATCHER_P(ContentsEqual, bl, "") {
class TestMockFixture : public TestFixture {
public:
- typedef boost::shared_ptr<librados::TestRadosClient> TestRadosClientPtr;
+ typedef boost::shared_ptr<librados::TestCluster> TestClusterRef;
static void SetUpTestCase();
static void TearDownTestCase();
- void SetUp() override;
void TearDown() override;
- ::testing::NiceMock<librados::MockTestMemRadosClient> &get_mock_rados_client() {
- return *s_mock_rados_client;
- }
-
void expect_op_work_queue(librbd::MockImageCtx &mock_image_ctx);
void expect_unlock_exclusive_lock(librbd::ImageCtx &ictx);
@@ -90,8 +86,7 @@ public:
void expect_commit_op_event(librbd::MockImageCtx &mock_image_ctx, int r);
private:
- static TestRadosClientPtr s_test_rados_client;
- static ::testing::NiceMock<librados::MockTestMemRadosClient> *s_mock_rados_client;
+ static TestClusterRef s_test_cluster;
};
#endif // CEPH_TEST_LIBRBD_TEST_MOCK_FIXTURE_H