milvus/tests/milvus_python_test/test.template

42 lines
1.1 KiB
Plaintext
Raw Normal View History

'''
Copyright 上海赜睿信息科技有限公司(Zilliz) - All Rights Reserved
Unauthorized copying of this file, via any medium is strictly prohibited.
Proprietary and confidential.
'''
'''
Test Description:
This document is only a template to show how to write a auto-test script
本文档仅仅是个展示如何编写自动化测试脚本的模板
'''
import pytest
from milvus import Milvus
class TestConnection:
def test_connect_localhost(self):
"""
TestCase1.1
Test target: This case is to check if the server can be connected.
Test method: Call API: milvus.connect to connect local milvus server, ip address: 127.0.0.1 and port: 19530, check the return status
Expectation: Return status is OK.
测试目的:本用例测试客户端是否可以与服务器建立连接
测试方法调用SDK API: milvus.connect方法连接本地服务器IP地址127.0.0.1端口19530检查调用返回状态
期望结果返回状态是OK
"""
milvus = Milvus()
milvus.connect(host='127.0.0.1', port='19530')
assert milvus.connected