Skip to content
This repository has been archived by the owner on Nov 13, 2024. It is now read-only.

Commit

Permalink
Fix tests (#308)
Browse files Browse the repository at this point in the history
  • Loading branch information
izellevy authored Feb 26, 2024
1 parent 8dfa859 commit 050869d
Show file tree
Hide file tree
Showing 2 changed files with 3 additions and 1 deletion.
3 changes: 2 additions & 1 deletion src/canopy/knowledge_base/knowledge_base.py
Original file line number Diff line number Diff line change
Expand Up @@ -666,7 +666,8 @@ def from_config(cls,
@lru_cache(maxsize=1)
def _is_serverless_env(self):
description = self._pinecone_client.describe_index(self.index_name)
return "serverless" in description["spec"]
return ("serverless" in description["spec"] or
description["spec"].get("pod", {}).get("environment") == "gcp-starter")

async def aquery(self,
queries: List[Query],
Expand Down
1 change: 1 addition & 0 deletions tests/conftest.py
Original file line number Diff line number Diff line change
Expand Up @@ -4,6 +4,7 @@
TEST_CREATE_INDEX_PARAMS = [
{"spec": {"serverless": {"cloud": "aws", "region": "us-west-2"}}},
{"spec": {"pod": {"environment": "eu-west1-gcp", "pod_type": "p1.x1"}}},
{"spec": {"pod": {"environment": "gcp-starter", "pod_type": "p1.x1"}}},
]


Expand Down

0 comments on commit 050869d

Please sign in to comment.