From 30bbab9575560a79106f0178b6ba34a5d2d333b9 Mon Sep 17 00:00:00 2001 From: Kaustav Ghosh Date: Thu, 19 Sep 2024 12:44:18 +0530 Subject: [PATCH] feat: Update Couchbase connection options in test_couchbasedb.py --- tests/unit/vector_stores/test_couchbasedb.py | 8 ++++++-- 1 file changed, 6 insertions(+), 2 deletions(-) diff --git a/tests/unit/vector_stores/test_couchbasedb.py b/tests/unit/vector_stores/test_couchbasedb.py index d17a703432..db22be4ccd 100644 --- a/tests/unit/vector_stores/test_couchbasedb.py +++ b/tests/unit/vector_stores/test_couchbasedb.py @@ -3,6 +3,8 @@ import time import unittest +from couchbase.auth import PasswordAuthenticator +from couchbase.options import ClusterOptions from dotenv import load_dotenv from graphrag.vector_stores.base import VectorStoreDocument, VectorStoreSearchResult @@ -29,10 +31,12 @@ def setUpClass(cls): index_name=INDEX_NAME, vector_size=VECTOR_SIZE ) + auth = PasswordAuthenticator(COUCHBASE_USERNAME, COUCHBASE_PASSWORD) + cluster_options = ClusterOptions(auth) + cls.vector_store.connect( connection_string=COUCHBASE_CONNECTION_STRING, - username=COUCHBASE_USERNAME, - password=COUCHBASE_PASSWORD + cluster_options=cluster_options ) @classmethod