2019-04-29 07:29:28 +00:00
|
|
|
////////////////////////////////////////////////////////////////////////////////
|
|
|
|
// Copyright 上海赜睿信息科技有限公司(Zilliz) - All Rights Reserved
|
|
|
|
// Unauthorized copying of this file, via any medium is strictly prohibited.
|
|
|
|
// Proprietary and confidential.
|
|
|
|
////////////////////////////////////////////////////////////////////////////////
|
|
|
|
#include <gtest/gtest.h>
|
|
|
|
#include <thread>
|
|
|
|
#include <easylogging++.h>
|
|
|
|
|
|
|
|
#include "utils.h"
|
|
|
|
#include "db/DBMetaImpl.h"
|
|
|
|
#include "db/Factories.h"
|
|
|
|
|
|
|
|
using namespace zilliz::vecwise::engine;
|
|
|
|
|
2019-04-29 07:47:09 +00:00
|
|
|
TEST_F(MetaTest, META_TEST) {
|
|
|
|
/* auto impl = DBMetaImplFactory::Build(); */
|
2019-04-29 07:29:28 +00:00
|
|
|
|
|
|
|
auto group_id = "meta_test_group";
|
|
|
|
|
|
|
|
meta::GroupSchema group;
|
|
|
|
group.group_id = group_id;
|
2019-04-29 07:47:09 +00:00
|
|
|
auto status = impl_->add_group(group);
|
2019-04-29 07:29:28 +00:00
|
|
|
ASSERT_TRUE(status.ok());
|
|
|
|
|
2019-04-29 07:47:09 +00:00
|
|
|
status = impl_->get_group(group);
|
2019-04-29 07:29:28 +00:00
|
|
|
ASSERT_TRUE(status.ok());
|
|
|
|
|
|
|
|
group.group_id = "not_found";
|
2019-04-29 07:47:09 +00:00
|
|
|
status = impl_->get_group(group);
|
2019-04-29 07:29:28 +00:00
|
|
|
ASSERT_TRUE(!status.ok());
|
|
|
|
|
2019-04-29 07:47:09 +00:00
|
|
|
/* impl->drop_all(); */
|
2019-04-29 07:29:28 +00:00
|
|
|
}
|