Skip to content

Commit

Permalink
ceph_test_rados_api_*: expose nspace
Browse files Browse the repository at this point in the history
Signed-off-by: Sage Weil <sage@redhat.com>
  • Loading branch information
liewegas committed Sep 8, 2014
1 parent 9ab46dc commit 19bfcaf
Show file tree
Hide file tree
Showing 2 changed files with 3 additions and 1 deletion.
3 changes: 2 additions & 1 deletion src/test/librados/TestCase.cc
Original file line number Diff line number Diff line change
Expand Up @@ -8,6 +8,7 @@
using namespace librados;

std::string RadosTest::pool_name;
std::string RadosTest::nspace;
rados_t RadosTest::s_cluster = NULL;

void RadosTest::SetUpTestCase()
Expand All @@ -25,7 +26,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));
}
Expand Down
1 change: 1 addition & 0 deletions src/test/librados/TestCase.h
Original file line number Diff line number Diff line change
Expand Up @@ -28,6 +28,7 @@ class RadosTest : public ::testing::Test {
static void cleanup_default_namespace(rados_ioctx_t ioctx);
static rados_t s_cluster;
static std::string pool_name;
static std::string nspace;

virtual void SetUp();
virtual void TearDown();
Expand Down

0 comments on commit 19bfcaf

Please sign in to comment.