未验证 提交 346b2ac2 编写于 作者: N NicoYuan1986 提交者: GitHub

Add test cases of index (#20093)

Signed-off-by: Nnico <cheng.yuan@zilliz.com>
Signed-off-by: Nnico <cheng.yuan@zilliz.com>
上级 00a0f7b6
......@@ -227,6 +227,19 @@ class TestIndexOperation(TestcaseBase):
collection_w.create_index(default_field_name, default_index)
collection_w.create_index(ct.default_int64_field_name, {})
@pytest.mark.tags(CaseLabel.L1)
def test_index_create_on_scalar_field(self):
"""
target: Test create index on scalar field
method: create index on scalar field and load
expected: raise exception
"""
collection_w = self.init_collection_general(prefix, True, is_index=True)[0]
collection_w.create_index(ct.default_int64_field_name, {})
collection_w.load(check_task=CheckTasks.err_res,
check_items={ct.err_code: 1, ct.err_msg: "there is no vector index on collection, "
"please create index firstly"})
@pytest.mark.tags(CaseLabel.L1)
def test_index_collection_empty(self):
"""
......
Markdown is supported
0% .
You are about to add 0 people to the discussion. Proceed with caution.
先完成此消息的编辑!
想要评论请 注册