mirror of
https://gitee.com/milvus-io/milvus.git
synced 2026-01-07 19:31:51 +08:00
test(db): add meta test
Former-commit-id: 9668abe43a31a04c58311c12834fe5b89da23c07
This commit is contained in:
parent
f096e0a109
commit
4a66580f4f
@ -27,7 +27,8 @@ set(db_test_src
|
||||
${wrapper_src}
|
||||
${require_files}
|
||||
utils.cpp
|
||||
db_tests.cpp)
|
||||
meta_tests.cpp)
|
||||
# db_tests.cpp)
|
||||
|
||||
cuda_add_executable(db_test ${db_test_src})
|
||||
|
||||
|
||||
34
cpp/unittest/db/meta_tests.cpp
Normal file
34
cpp/unittest/db/meta_tests.cpp
Normal file
@ -0,0 +1,34 @@
|
||||
////////////////////////////////////////////////////////////////////////////////
|
||||
// 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;
|
||||
|
||||
TEST_F(DBTest, META_TEST) {
|
||||
auto impl = DBMetaImplFactory::Build();
|
||||
|
||||
auto group_id = "meta_test_group";
|
||||
|
||||
meta::GroupSchema group;
|
||||
group.group_id = group_id;
|
||||
auto status = impl->add_group(group);
|
||||
ASSERT_TRUE(status.ok());
|
||||
|
||||
status = impl->get_group(group);
|
||||
ASSERT_TRUE(status.ok());
|
||||
|
||||
group.group_id = "not_found";
|
||||
status = impl->get_group(group);
|
||||
ASSERT_TRUE(!status.ok());
|
||||
|
||||
impl->drop_all();
|
||||
}
|
||||
Loading…
x
Reference in New Issue
Block a user