void
FileSystemTestSetup::SetUp()
{
    Py_Initialize();

    fs::remove_all(topdir_);

    make_dirs_(topdir_);
    fs::create_directories(remote_dir(topdir_));

    ::setenv("VD_CONFIG_DIR", configuration_.string().c_str(), 1);

    initialize_connection_manager();

    arakoon_test_setup_->setUpArakoon();

    mds_test_setup_ = std::make_shared<vdt::MDSTestSetup>(mds_dir(topdir_));
    mds_manager_ = mds_test_setup_->make_manager(cm_);
    const mds::ServerConfigs scfgs(mds_manager_->server_configs());

    ASSERT_EQ(1U,
              scfgs.size());

    mds_server_config_ = std::make_unique<mds::ServerConfig>(scfgs[0]);
    mdstore_test_setup_ =
        std::make_unique<vdt::MetaDataStoreTestSetup>(arakoon_test_setup_,
                mds_server_config_->node_config);

    start_failovercache_for_local_node();
}
Esempio n. 2
0
    MDSNodeConfigs
    node_configs(mds::Manager& mgr)
    {
        const mds::ServerConfigs scfgs(mgr.server_configs());

        EXPECT_EQ(2U,
                  scfgs.size());

        MDSNodeConfigs ncfgs;
        ncfgs.reserve(scfgs.size());

        for (const auto& s : scfgs)
        {
            ncfgs.emplace_back(s.node_config);
        }

        return ncfgs;
    }