Add really basic testing for memory API

weaviate does not work; the cluster URL seems malformed
This commit is contained in:
Ashwin Bharambe 2024-10-07 22:34:53 -07:00 committed by Ashwin Bharambe
parent dba7caf1d0
commit 4ab6e1b81a
10 changed files with 220 additions and 81 deletions

View file

@ -70,8 +70,12 @@ class CommonRoutingTableImpl(RoutingTable):
def get_provider_impl(self, routing_key: str) -> Any:
if routing_key not in self.routing_key_to_object:
raise ValueError(f"Could not find provider for {routing_key}")
raise ValueError(f"Object `{routing_key}` not registered")
obj = self.routing_key_to_object[routing_key]
if obj.provider_id not in self.impls_by_provider_id:
raise ValueError(f"Provider `{obj.provider_id}` not found")
return self.impls_by_provider_id[obj.provider_id]
def get_object_by_identifier(self, identifier: str) -> Optional[RoutableObject]: