Skip to content

Commit

Permalink
Fix grcp tests
Browse files Browse the repository at this point in the history
  • Loading branch information
dirkkul committed May 15, 2023
1 parent db78210 commit 690771d
Show file tree
Hide file tree
Showing 3 changed files with 13 additions and 11 deletions.
4 changes: 2 additions & 2 deletions integration/test_cluster.py
Original file line number Diff line number Diff line change
Expand Up @@ -2,8 +2,8 @@

import weaviate

GIT_HASH = "39c4c45"
SERVER_VERSION = "1.19.2"
GIT_HASH = "c804a73"
SERVER_VERSION = "1.19.3"
NODE_NAME = "node1"
NUM_OBJECT = 10

Expand Down
16 changes: 8 additions & 8 deletions integration/test_grcp.py
Original file line number Diff line number Diff line change
Expand Up @@ -49,8 +49,7 @@
[
"test",
["test", "abc"],
["test", "_additional{id}"],
["test", "ref {... on Test {test abc _additional{id vector}}}"],
["test", "ref {... on Test {test abc}}"],
],
)
def test_grcp(
Expand Down Expand Up @@ -142,18 +141,19 @@ def test_grpc_errors():
"http://localhost:8080",
additional_config=Config(grpc_port_experimental=50051),
)
class_name = "grpc_class_validation"
if client.schema.exists(class_name):
client.schema.delete_class(class_name)
classname = CLASS1["class"]
if client.schema.exists(classname):
client.schema.delete_class(classname)
client.schema.create_class(CLASS1)

client.data_object.create({"test": "test"}, class_name)
client.data_object.create({"test": "test"}, classname)

# class errors
res = client.query.get(class_name + "does_not_exist", ["test"]).do()
res = client.query.get(classname + "does_not_exist", ["test"]).do()
assert "errors" in res
assert "data" not in res

# prop errors
res = client.query.get(class_name, ["test", "made_up_prop"]).do()
res = client.query.get(classname, ["test", "made_up_prop"]).do()
assert "errors" in res
assert "data" not in res
4 changes: 3 additions & 1 deletion weaviate/gql/get.py
Original file line number Diff line number Diff line change
Expand Up @@ -1214,7 +1214,9 @@ def do(self) -> dict:
and self._where is None
and self._after is None
and all(
"..." not in prop for prop in self._properties if isinstance(prop, str)
"..." not in prop and "_additional" not in prop
for prop in self._properties
if isinstance(prop, str)
) # no ref props as strings
)
if grpc_enabled:
Expand Down

0 comments on commit 690771d

Please sign in to comment.