]> git-server-git.apps.pok.os.sepia.ceph.com Git - ceph.git/commitdiff
ceph_test_rados_api_*: expose RadosTest::nspace
authorDavid Zafman <dzafman@redhat.com>
Wed, 10 Sep 2014 22:59:34 +0000 (15:59 -0700)
committerDavid Zafman <dzafman@redhat.com>
Mon, 20 Oct 2014 17:47:50 +0000 (10:47 -0700)
Expose RadosTestEC::nspace
Rename others to nspace for consistency

Signed-off-by: David Zafman <dzafman@redhat.com>
src/test/librados/TestCase.cc
src/test/librados/TestCase.h
src/test/librados/snapshots.cc
src/test/librados/tier.cc

index 21124ce2251c80548f8544689f1cb105b1f45ccc..9d9668e90808292bc3bf9012a844fb951c3650b3 100644 (file)
@@ -25,7 +25,7 @@ void RadosTest::SetUp()
 {
   cluster = RadosTest::s_cluster;
   ASSERT_EQ(0, rados_ioctx_create(cluster, pool_name.c_str(), &ioctx));
-  std::string nspace = get_temp_pool_name();
+  nspace = get_temp_pool_name();
   rados_ioctx_set_namespace(ioctx, nspace.c_str());
   ASSERT_FALSE(rados_ioctx_pool_requires_alignment(ioctx));
 }
@@ -71,8 +71,8 @@ void RadosTestPP::TearDownTestCase()
 void RadosTestPP::SetUp()
 {
   ASSERT_EQ(0, cluster.ioctx_create(pool_name.c_str(), ioctx));
-  ns = get_temp_pool_name();
-  ioctx.set_namespace(ns);
+  nspace = get_temp_pool_name();
+  ioctx.set_namespace(nspace);
   ASSERT_FALSE(ioctx.pool_requires_alignment());
 }
 
@@ -152,8 +152,8 @@ void RadosTestParamPP::SetUp()
   }
 
   ASSERT_EQ(0, cluster.ioctx_create(pool_name.c_str(), ioctx));
-  ns = get_temp_pool_name();
-  ioctx.set_namespace(ns);
+  nspace = get_temp_pool_name();
+  ioctx.set_namespace(nspace);
   ASSERT_FALSE(ioctx.pool_requires_alignment());
 }
 
@@ -193,7 +193,7 @@ void RadosTestEC::SetUp()
 {
   cluster = RadosTestEC::s_cluster;
   ASSERT_EQ(0, rados_ioctx_create(cluster, pool_name.c_str(), &ioctx));
-  std::string nspace = get_temp_pool_name();
+  nspace = get_temp_pool_name();
   rados_ioctx_set_namespace(ioctx, nspace.c_str());
   ASSERT_TRUE(rados_ioctx_pool_requires_alignment(ioctx));
   alignment = rados_ioctx_pool_required_alignment(ioctx);
@@ -223,8 +223,8 @@ void RadosTestECPP::TearDownTestCase()
 void RadosTestECPP::SetUp()
 {
   ASSERT_EQ(0, cluster.ioctx_create(pool_name.c_str(), ioctx));
-  ns = get_temp_pool_name();
-  ioctx.set_namespace(ns);
+  nspace = get_temp_pool_name();
+  ioctx.set_namespace(nspace);
   ASSERT_TRUE(ioctx.pool_requires_alignment());
   alignment = ioctx.pool_required_alignment();
   ASSERT_NE((unsigned)0, alignment);
index 79b1465f871883e11d12d7ec99f1526d372eb0f3..4d8484ac3748900e231f5d159e12d7344cc805f2 100644 (file)
@@ -33,6 +33,7 @@ protected:
   virtual void TearDown();
   rados_t cluster;
   rados_ioctx_t ioctx;
+  std::string nspace;
 };
 
 class RadosTestPP : public ::testing::Test {
@@ -50,7 +51,7 @@ protected:
   virtual void TearDown();
   librados::Rados &cluster;
   librados::IoCtx ioctx;
-  std::string ns;
+  std::string nspace;
 };
 
 class RadosTestParamPP : public ::testing::TestWithParam<const char*> {
@@ -69,7 +70,7 @@ protected:
   virtual void TearDown();
   librados::Rados &cluster;
   librados::IoCtx ioctx;
-  std::string ns;
+  std::string nspace;
 };
 
 class RadosTestEC : public RadosTest {
@@ -86,6 +87,7 @@ protected:
   virtual void TearDown();
   rados_t cluster;
   rados_ioctx_t ioctx;
+  std::string nspace;
   uint64_t alignment;
 };
 
@@ -103,8 +105,7 @@ protected:
   virtual void TearDown();
   librados::Rados &cluster;
   librados::IoCtx ioctx;
-  std::string ns;
+  std::string nspace;
   uint64_t alignment;
 };
-
 #endif
index 020af111ddf97de72cae83aa7e67cf2c16ce2fce..e9c566a711d58bc7a2f65800273d107ae9382d68 100644 (file)
@@ -256,7 +256,7 @@ TEST_F(LibRadosSnapshotsSelfManagedPP, RollbackPP) {
   std::vector<uint64_t> my_snaps;
   IoCtx readioctx;
   ASSERT_EQ(0, cluster.ioctx_create(pool_name.c_str(), readioctx));
-  readioctx.set_namespace(ns);
+  readioctx.set_namespace(nspace);
   readioctx.snap_set_read(LIBRADOS_SNAP_DIR);
 
   my_snaps.push_back(-2);
@@ -340,7 +340,7 @@ TEST_F(LibRadosSnapshotsSelfManagedPP, SnapOverlapPP) {
   std::vector<uint64_t> my_snaps;
   IoCtx readioctx;
   ASSERT_EQ(0, cluster.ioctx_create(pool_name.c_str(), readioctx));
-  readioctx.set_namespace(ns);
+  readioctx.set_namespace(nspace);
   readioctx.snap_set_read(LIBRADOS_SNAP_DIR);
 
   my_snaps.push_back(-2);
@@ -714,7 +714,7 @@ TEST_F(LibRadosSnapshotsSelfManagedECPP, RollbackPP) {
   std::vector<uint64_t> my_snaps;
   IoCtx readioctx;
   ASSERT_EQ(0, cluster.ioctx_create(pool_name.c_str(), readioctx));
-  readioctx.set_namespace(ns);
+  readioctx.set_namespace(nspace);
   readioctx.snap_set_read(LIBRADOS_SNAP_DIR);
 
   my_snaps.push_back(-2);
index eeb11254ab74fba0e93288cced05c595b8f12125..ef7d80b5f2af20e5ded3d21c1dbae6d91b482055 100644 (file)
@@ -87,7 +87,7 @@ protected:
   virtual void SetUp() {
     RadosTestPP::SetUp();
     ASSERT_EQ(0, cluster.ioctx_create(cache_pool_name.c_str(), cache_ioctx));
-    cache_ioctx.set_namespace(ns);
+    cache_ioctx.set_namespace(nspace);
   }
   virtual void TearDown() {
     RadosTestPP::TearDown();
@@ -2270,7 +2270,7 @@ protected:
   virtual void SetUp() {
     RadosTestECPP::SetUp();
     ASSERT_EQ(0, cluster.ioctx_create(cache_pool_name.c_str(), cache_ioctx));
-    cache_ioctx.set_namespace(ns);
+    cache_ioctx.set_namespace(nspace);
   }
   virtual void TearDown() {
     RadosTestECPP::TearDown();