Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

build: fix astra integration tests #3518

Merged
merged 11 commits into from
Aug 26, 2024
Prev Previous commit
Next Next commit
update providerkey
jordanrfrazier authored and ogabrielluiz committed Aug 26, 2024
commit cd3ded3842bf89225dfc1239e9b0a87835d9a0e6
8 changes: 4 additions & 4 deletions src/backend/tests/integration/astra/test_astra_component.py
Original file line number Diff line number Diff line change
@@ -102,7 +102,7 @@ def test_astra_vectorize():

store = None
try:
options = {"provider": "nvidia", "modelName": "NV-Embed-QA", "parameters": {}, "authentication": {}}
options = {"provider": "nvidia", "modelName": "NV-Embed-QA"}
store = AstraDBVectorStore(
collection_name=VECTORIZE_COLLECTION,
api_endpoint=os.getenv("ASTRA_DB_API_ENDPOINT"),
@@ -189,7 +189,7 @@ def test_astra_vectorize_with_provider_api_key():


@pytest.mark.skipif(
not check_env_vars("ASTRA_DB_APPLICATION_TOKEN", "ASTRA_DB_API_ENDPOINT", "OPENAI_API_KEY"),
not check_env_vars("ASTRA_DB_APPLICATION_TOKEN", "ASTRA_DB_API_ENDPOINT"),
reason="missing env vars",
)
def test_astra_vectorize_passes_authentication():
@@ -206,7 +206,7 @@ def test_astra_vectorize_passes_authentication():
"provider": "openai",
"modelName": "text-embedding-3-small",
"parameters": {},
"authentication": {"providerKey": "providerKey"},
"authentication": {"providerKey": "apikey"},
}
store = AstraDBVectorStore(
collection_name=VECTORIZE_COLLECTION_OPENAI_WITH_AUTH,
@@ -219,7 +219,7 @@ def test_astra_vectorize_passes_authentication():

vectorize = AstraVectorizeComponent()
vectorize.build(
provider="OpenAI", model_name="text-embedding-3-small", authentication={"providerKey": "providerKey"}
provider="OpenAI", model_name="text-embedding-3-small", authentication={"providerKey": "apikey"}
)
vectorize_options = vectorize.build_options()