Replication refactor (part 5) (#1378)

This commit is contained in:
andrejtonev
2023-11-06 12:50:49 +01:00
committed by GitHub
parent 16b8c7b27c
commit dbc6054689
87 changed files with 3180 additions and 2313 deletions

View File

@@ -10,6 +10,7 @@
// licenses/APL.txt.
#include "query/auth_query_handler.hpp"
#include "storage/v2/config.hpp"
#ifdef MG_ENTERPRISE
#include <gmock/gmock.h>
#include <gtest/gtest.h>
@@ -51,15 +52,18 @@ class TestEnvironment : public ::testing::Environment {
auth =
std::make_unique<memgraph::utils::Synchronized<memgraph::auth::Auth, memgraph::utils::WritePrioritizedRWLock>>(
storage_directory / "auth");
ptr_ = std::make_unique<memgraph::dbms::DbmsHandler>(storage_conf, auth.get(), false, true);
repl_state_.emplace(memgraph::storage::ReplicationStateRootPath(storage_conf));
ptr_ = std::make_unique<memgraph::dbms::DbmsHandler>(storage_conf, *repl_state_, auth.get(), false, true);
}
void TearDown() override {
ptr_.reset();
auth.reset();
repl_state_.reset();
}
static std::unique_ptr<memgraph::dbms::DbmsHandler> ptr_;
std::optional<memgraph::replication::ReplicationState> repl_state_;
};
std::unique_ptr<memgraph::dbms::DbmsHandler> TestEnvironment::ptr_ = nullptr;