mirror of
https://github.com/deepseek-ai/3FS
synced 2025-06-26 18:16:45 +00:00
Initial commit
This commit is contained in:
27
tests/common/kv/fdb/FDBTestBase.h
Normal file
27
tests/common/kv/fdb/FDBTestBase.h
Normal file
@@ -0,0 +1,27 @@
|
||||
#pragma once
|
||||
|
||||
#include <gtest/gtest.h>
|
||||
#include <memory>
|
||||
#include <thread>
|
||||
|
||||
#include "fdb/FDB.h"
|
||||
#include "fdb/FDBContext.h"
|
||||
#include "gtest/gtest.h"
|
||||
#include "tests/fdb/SetupFDB.h"
|
||||
|
||||
namespace hf3fs::kv {
|
||||
class FDBTestBase : public testing::SetupFDB {
|
||||
protected:
|
||||
void SetUp() override {
|
||||
auto cluster = std::getenv("FDB_UNITTEST_CLUSTER");
|
||||
if (!cluster) {
|
||||
GTEST_SKIP_("FDB_UNITTEST_CLUSTER not set skip test");
|
||||
}
|
||||
db_ = fdb::DB(cluster, false);
|
||||
}
|
||||
|
||||
protected:
|
||||
fdb::DB db_;
|
||||
};
|
||||
|
||||
} // namespace hf3fs::kv
|
||||
Reference in New Issue
Block a user