add integration test guide

Signed-off-by: ChengZi <chen.zhang@zilliz.com>
pull/21077/head
ChengZi 2 weeks ago
parent 1dbad0092e
commit bfb9f16e13

@ -13,6 +13,18 @@ from pymilvus import (
from langchain_milvus.retrievers import MilvusCollectionHybridSearchRetriever
from tests.integration_tests.utils import FakeEmbeddings
#
# To run this test properly, please start a Milvus server with the following command:
#
# ```shell
# wget https://raw.githubusercontent.com/milvus-io/milvus/master/scripts/standalone_embed.sh
# bash standalone_embed.sh start
# ```
#
# Here is the reference:
# https://milvus.io/docs/install_standalone-docker.md
#
class TestMilvusHybridSearch(unittest.TestCase):
def setUp(self) -> None:

@ -10,6 +10,18 @@ from tests.integration_tests.utils import (
fake_texts,
)
#
# To run this test properly, please start a Milvus server with the following command:
#
# ```shell
# wget https://raw.githubusercontent.com/milvus-io/milvus/master/scripts/standalone_embed.sh
# bash standalone_embed.sh start
# ```
#
# Here is the reference:
# https://milvus.io/docs/install_standalone-docker.md
#
def _milvus_from_texts(
metadatas: Optional[List[dict]] = None,

@ -1,4 +1,5 @@
"""Test Zilliz functionality."""
import os
from typing import List, Optional
from langchain_core.documents import Document
@ -10,6 +11,11 @@ from tests.integration_tests.utils import (
fake_texts,
)
#
# To run this test properly, you need to log in [Zilliz](https://zilliz.com/cloud),
# and set `ZILLIZ_CLOUD_URI` and `ZILLIZ_CLOUD_API_KEY` environment variables.
#
def _zilliz_from_texts(
metadatas: Optional[List[dict]] = None, drop: bool = True
@ -19,9 +25,8 @@ def _zilliz_from_texts(
FakeEmbeddings(),
metadatas=metadatas,
connection_args={
"uri": "",
"user": "",
"password": "",
"uri": os.getenv("ZILLIZ_CLOUD_URI"),
"token": os.getenv("ZILLIZ_CLOUD_API_KEY"),
"secure": True,
},
drop_old=drop,

Loading…
Cancel
Save