meta_tests.cpp 996 字节
Newer Older
X
Xu Peng 已提交
1 2 3 4 5 6 7 8 9 10 11 12 13 14 15
////////////////////////////////////////////////////////////////////////////////
// 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;

X
Xu Peng 已提交
16 17
TEST_F(MetaTest, META_TEST) {
    /* auto impl = DBMetaImplFactory::Build(); */
X
Xu Peng 已提交
18 19 20 21 22

    auto group_id = "meta_test_group";

    meta::GroupSchema group;
    group.group_id = group_id;
X
Xu Peng 已提交
23
    auto status = impl_->add_group(group);
X
Xu Peng 已提交
24 25
    ASSERT_TRUE(status.ok());

X
Xu Peng 已提交
26
    status = impl_->get_group(group);
X
Xu Peng 已提交
27 28 29
    ASSERT_TRUE(status.ok());

    group.group_id = "not_found";
X
Xu Peng 已提交
30
    status = impl_->get_group(group);
X
Xu Peng 已提交
31 32
    ASSERT_TRUE(!status.ok());

X
Xu Peng 已提交
33
    /* impl->drop_all(); */
X
Xu Peng 已提交
34
}