mirror of
https://github.com/ceph/ceph
synced 2025-02-23 11:07:35 +00:00
ceph_test_objectstore: fail the test if SetUp() fails
so it will issues a fatal error if anything goes wrong, instead of continuing with the test cases. Signed-off-by: Kefu Chai <kchai@redhat.com>
This commit is contained in:
parent
7f4dff2248
commit
afac9345fd
@ -22,8 +22,8 @@ void StoreTestFixture::SetUp() {
|
||||
if (r < 0) {
|
||||
r = -errno;
|
||||
cerr << __func__ << ": unable to create " << data_dir << ": " << cpp_strerror(r) << std::endl;
|
||||
return;
|
||||
}
|
||||
ASSERT_EQ(0, r);
|
||||
|
||||
store.reset(ObjectStore::create(g_ceph_context,
|
||||
type,
|
||||
@ -31,10 +31,10 @@ void StoreTestFixture::SetUp() {
|
||||
string("store_test_temp_journal")));
|
||||
if (!store) {
|
||||
cerr << __func__ << ": objectstore type " << type << " doesn't exist yet!" << std::endl;
|
||||
return;
|
||||
}
|
||||
EXPECT_EQ(0, store->mkfs());
|
||||
EXPECT_EQ(0, store->mount());
|
||||
ASSERT_TRUE(store);
|
||||
ASSERT_EQ(0, store->mkfs());
|
||||
ASSERT_EQ(0, store->mount());
|
||||
}
|
||||
|
||||
void StoreTestFixture::TearDown() {
|
||||
|
Loading…
Reference in New Issue
Block a user