Fix some bugs when testing opensds ansible
[stor4nfv.git] / src / ceph / src / test / librbd / test_Operations.cc
1 // -*- mode:C++; tab-width:8; c-basic-offset:2; indent-tabs-mode:t -*-
2 // vim: ts=8 sw=2 smarttab
3
4 #include "test/librbd/test_fixture.h"
5 #include "test/librbd/test_support.h"
6 #include "librbd/ImageCtx.h"
7 #include "librbd/Operations.h"
8
9 void register_test_operations() {
10 }
11
12 class TestOperations : public TestFixture {
13 public:
14
15 };
16
17 TEST_F(TestOperations, DisableJournalingCorrupt) {
18   REQUIRE_FEATURE(RBD_FEATURE_JOURNALING);
19
20   librbd::ImageCtx *ictx;
21   ASSERT_EQ(0, open_image(m_image_name, &ictx));
22   ASSERT_EQ(0, m_ioctx.remove("journal." + ictx->id));
23   ASSERT_EQ(0, ictx->operations->update_features(RBD_FEATURE_JOURNALING,
24                                                  false));
25 }
26