Skip to content

Commit

Permalink
fix test error
Browse files Browse the repository at this point in the history
  • Loading branch information
nevermore3 committed Oct 14, 2021
1 parent 5cd82d7 commit 3e4407a
Show file tree
Hide file tree
Showing 34 changed files with 469 additions and 466 deletions.
10 changes: 5 additions & 5 deletions tests/admin/test_permission.py
Original file line number Diff line number Diff line change
Expand Up @@ -573,7 +573,7 @@ def test_schema_and_data(self):
resp = self.dbaClient.execute(query)
self.check_resp_succeeded(resp)

query = 'GO FROM "1" OVER e1';
query = 'GO FROM "1" OVER e1 YIELD e1._dst';
resp = self.dbaClient.execute(query)
self.check_resp_succeeded(resp)

Expand All @@ -590,7 +590,7 @@ def test_schema_and_data(self):
resp = self.adminClient.execute(query)
self.check_resp_succeeded(resp)

query = 'GO FROM "1" OVER e1';
query = 'GO FROM "1" OVER e1 YIELD e1._dst';
resp = self.adminClient.execute(query)
self.check_resp_succeeded(resp)

Expand All @@ -607,7 +607,7 @@ def test_schema_and_data(self):
resp = self.dbaClient.execute(query)
self.check_resp_succeeded(resp)

query = 'GO FROM "1" OVER e1';
query = 'GO FROM "1" OVER e1 YIELD e1._dst';
resp = self.dbaClient.execute(query)
self.check_resp_succeeded(resp)

Expand All @@ -624,7 +624,7 @@ def test_schema_and_data(self):
resp = self.userClient.execute(query)
self.check_resp_succeeded(resp)

query = 'GO FROM "1" OVER e1';
query = 'GO FROM "1" OVER e1 YIELD e1._dst';
resp = self.userClient.execute(query)
self.check_resp_succeeded(resp)

Expand All @@ -641,7 +641,7 @@ def test_schema_and_data(self):
resp = self.guestClient.execute(query)
self.check_resp_failed(resp, ttypes.ErrorCode.E_BAD_PERMISSION)

query = 'GO FROM "1" OVER e1';
query = 'GO FROM "1" OVER e1 YIELD e1._dst';
resp = self.guestClient.execute(query)
self.check_resp_succeeded(resp)

Expand Down
3 changes: 1 addition & 2 deletions tests/query/stateless/test_go.py
Original file line number Diff line number Diff line change
Expand Up @@ -151,8 +151,7 @@ def test_2_steps(self):
self.check_resp_succeeded(resp)
self.check_out_of_order_result(resp, expect_result)

# go 2 steps without YIELD
cmd = 'GO 2 STEPS FROM "1016" OVER is_friend;'
cmd = 'GO 2 STEPS FROM "1016" OVER is_friend YIELD is_friend._dst;'
resp = self.execute(cmd)
expect_result = [["1016"], ["1020"]]
self.check_resp_succeeded(resp)
Expand Down
2 changes: 1 addition & 1 deletion tests/tck/features/aggregate/Agg.feature
Original file line number Diff line number Diff line change
Expand Up @@ -694,7 +694,7 @@ Feature: Basic Aggregate and GroupBy
Then a SemanticError should be raised at runtime: `count(*)' is not support in go sentence.
When executing query:
"""
GO FROM "Tim Duncan" OVER like where COUNT(*) > 2
GO FROM "Tim Duncan" OVER like where COUNT(*) > 2 YIELD like._dst
"""
Then a SemanticError should be raised at runtime: `(COUNT(*)>2)', not support aggregate function in where sentence.
When executing query:
Expand Down
6 changes: 3 additions & 3 deletions tests/tck/features/bugfix/TestYieldConstantAfterPipe.feature
Original file line number Diff line number Diff line change
Expand Up @@ -10,7 +10,7 @@ Feature: Test yield constant after pipe
Scenario: yield constant after pipe
When executing query:
"""
GO FROM "Tim Duncan" OVER * | YIELD 1 AS a;
GO FROM "Tim Duncan" OVER * YIELD dst(edge) | YIELD 1 AS a;
"""
Then the result should be, in any order:
| a |
Expand All @@ -23,7 +23,7 @@ Feature: Test yield constant after pipe
| 1 |
When executing query:
"""
GO FROM "Tim Duncan" OVER * | YIELD 1 AS a WHERE true;
GO FROM "Tim Duncan" OVER * YIELD dst(edge) | YIELD 1 AS a WHERE true;
"""
Then the result should be, in any order:
| a |
Expand All @@ -36,7 +36,7 @@ Feature: Test yield constant after pipe
| 1 |
When executing query:
"""
GO FROM "Tim Duncan" OVER * | YIELD 1 AS a WHERE false;
GO FROM "Tim Duncan" OVER * YIELD dst(edge) | YIELD 1 AS a WHERE false;
"""
Then the result should be, in any order:
| a |
8 changes: 4 additions & 4 deletions tests/tck/features/delete/DeleteEdge.IntVid.feature
Original file line number Diff line number Diff line change
Expand Up @@ -147,7 +147,7 @@ Feature: Delete int vid of edge
# delete with pipe, get result by go
When executing query:
"""
GO FROM hash("Boris Diaw") OVER like
GO FROM hash("Boris Diaw") OVER like YIELD like._dst
"""
Then the result should be, in any order, and the columns 0 should be hashed:
| like._dst |
Expand All @@ -162,14 +162,14 @@ Feature: Delete int vid of edge
Then the execution should be successful
When executing query:
"""
GO FROM hash("Boris Diaw") OVER like
GO FROM hash("Boris Diaw") OVER like YIELD like._dst
"""
Then the result should be, in any order:
| like._dst |
# delete with var, get result by go
When executing query:
"""
GO FROM hash("Russell Westbrook") OVER like
GO FROM hash("Russell Westbrook") OVER like YIELD like._dst
"""
Then the result should be, in any order, and the columns 0 should be hashed:
| like._dst |
Expand All @@ -184,7 +184,7 @@ Feature: Delete int vid of edge
Then the execution should be successful
When executing query:
"""
GO FROM hash("Russell Westbrook") OVER like
GO FROM hash("Russell Westbrook") OVER like YIELD like._dst
"""
Then the result should be, in any order:
| like._dst |
Expand Down
8 changes: 4 additions & 4 deletions tests/tck/features/delete/DeleteEdge.feature
Original file line number Diff line number Diff line change
Expand Up @@ -147,7 +147,7 @@ Feature: Delete string vid of edge
# delete with pipe, get result by go
When executing query:
"""
GO FROM "Boris Diaw" OVER like
GO FROM "Boris Diaw" OVER like YIELD like._dst
"""
Then the result should be, in any order:
| like._dst |
Expand All @@ -162,14 +162,14 @@ Feature: Delete string vid of edge
Then the execution should be successful
When executing query:
"""
GO FROM "Boris Diaw" OVER like
GO FROM "Boris Diaw" OVER like YIELD like._dst
"""
Then the result should be, in any order:
| like._dst |
# delete with var, get result by go
When executing query:
"""
GO FROM "Russell Westbrook" OVER like
GO FROM "Russell Westbrook" OVER like YIELD like._dst
"""
Then the result should be, in any order:
| like._dst |
Expand All @@ -184,7 +184,7 @@ Feature: Delete string vid of edge
Then the execution should be successful
When executing query:
"""
GO FROM "Russell Westbrook" OVER like
GO FROM "Russell Westbrook" OVER like YIELD like._dst
"""
Then the result should be, in any order:
| like._dst |
Expand Down
98 changes: 49 additions & 49 deletions tests/tck/features/delete/DeleteTag.IntVid.feature
Original file line number Diff line number Diff line change
Expand Up @@ -12,16 +12,16 @@ Feature: Delete int vid of tag
"""
FETCH PROP ON player hash("Tim Duncan") YIELD player.name, player.age
"""
Then the result should be, in any order, and the columns 0 should be hashed:
| VertexID | player.name | player.age |
| "Tim Duncan" | "Tim Duncan" | 42 |
Then the result should be, in any order:
| player.name | player.age |
| "Tim Duncan" | 42 |
When executing query:
"""
FETCH PROP ON bachelor hash("Tim Duncan") YIELD bachelor.name, bachelor.speciality
"""
Then the result should be, in any order, and the columns 0 should be hashed:
| VertexID | bachelor.name | bachelor.speciality |
| "Tim Duncan" | "Tim Duncan" | "psychology" |
Then the result should be, in any order:
| bachelor.name | bachelor.speciality |
| "Tim Duncan" | "psychology" |
When executing query:
"""
LOOKUP ON player WHERE player.name == "Tim Duncan"
Expand All @@ -40,15 +40,15 @@ Feature: Delete int vid of tag
"""
FETCH PROP ON player hash("Tim Duncan") YIELD player.name, player.age
"""
Then the result should be, in any order, and the columns 0 should be hashed:
| VertexID | player.name | player.age |
Then the result should be, in any order:
| player.name | player.age |
When executing query:
"""
FETCH PROP ON bachelor hash("Tim Duncan") YIELD bachelor.name, bachelor.speciality
"""
Then the result should be, in any order, and the columns 0 should be hashed:
| VertexID | bachelor.name | bachelor.speciality |
| "Tim Duncan" | "Tim Duncan" | "psychology" |
Then the result should be, in any order:
| bachelor.name | bachelor.speciality |
| "Tim Duncan" | "psychology" |
When executing query:
"""
LOOKUP ON player WHERE player.name == "Tim Duncan"
Expand All @@ -65,16 +65,16 @@ Feature: Delete int vid of tag
"""
FETCH PROP ON player hash("Tim Duncan") YIELD player.name, player.age
"""
Then the result should be, in any order, and the columns 0 should be hashed:
| VertexID | player.name | player.age |
| "Tim Duncan" | "Tim Duncan" | 42 |
Then the result should be, in any order:
| player.name | player.age |
| "Tim Duncan" | 42 |
When executing query:
"""
FETCH PROP ON bachelor hash("Tim Duncan") YIELD bachelor.name, bachelor.speciality
"""
Then the result should be, in any order, and the columns 0 should be hashed:
| VertexID | bachelor.name | bachelor.speciality |
| "Tim Duncan" | "Tim Duncan" | "psychology" |
Then the result should be, in any order:
| bachelor.name | bachelor.speciality |
| "Tim Duncan" | "psychology" |
When executing query:
"""
LOOKUP ON player WHERE player.name == "Tim Duncan"
Expand All @@ -93,14 +93,14 @@ Feature: Delete int vid of tag
"""
FETCH PROP ON player hash("Tim Duncan") YIELD player.name, player.age
"""
Then the result should be, in any order, and the columns 0 should be hashed:
| VertexID | player.name | player.age |
Then the result should be, in any order:
| player.name | player.age |
When executing query:
"""
FETCH PROP ON bachelor hash("Tim Duncan") YIELD bachelor.name, bachelor.speciality
"""
Then the result should be, in any order, and the columns 0 should be hashed:
| VertexID | bachelor.name | bachelor.speciality |
Then the result should be, in any order:
| bachelor.name | bachelor.speciality |
When executing query:
"""
LOOKUP ON player WHERE player.name == "Tim Duncan"
Expand All @@ -117,16 +117,16 @@ Feature: Delete int vid of tag
"""
FETCH PROP ON player hash("Tim Duncan") YIELD player.name, player.age
"""
Then the result should be, in any order, and the columns 0 should be hashed:
| VertexID | player.name | player.age |
| "Tim Duncan" | "Tim Duncan" | 42 |
Then the result should be, in any order:
| player.name | player.age |
| "Tim Duncan" | 42 |
When executing query:
"""
FETCH PROP ON bachelor hash("Tim Duncan") YIELD bachelor.name, bachelor.speciality
"""
Then the result should be, in any order, and the columns 0 should be hashed:
| VertexID | bachelor.name | bachelor.speciality |
| "Tim Duncan" | "Tim Duncan" | "psychology" |
Then the result should be, in any order:
| bachelor.name | bachelor.speciality |
| "Tim Duncan" | "psychology" |
When executing query:
"""
LOOKUP ON player WHERE player.name == "Tim Duncan"
Expand All @@ -145,14 +145,14 @@ Feature: Delete int vid of tag
"""
FETCH PROP ON player hash("Tim Duncan") YIELD player.name, player.age
"""
Then the result should be, in any order, and the columns 0 should be hashed:
| VertexID | player.name | player.age |
Then the result should be, in any order:
| player.name | player.age |
When executing query:
"""
FETCH PROP ON bachelor hash("Tim Duncan") YIELD bachelor.name, bachelor.speciality
"""
Then the result should be, in any order, and the columns 0 should be hashed:
| VertexID | bachelor.name | bachelor.speciality |
Then the result should be, in any order:
| bachelor.name | bachelor.speciality |
When executing query:
"""
LOOKUP ON player WHERE player.name == "Tim Duncan"
Expand All @@ -169,16 +169,16 @@ Feature: Delete int vid of tag
"""
FETCH PROP ON player hash("Tim Duncan") YIELD player.name, player.age
"""
Then the result should be, in any order, and the columns 0 should be hashed:
| VertexID | player.name | player.age |
| "Tim Duncan" | "Tim Duncan" | 42 |
Then the result should be, in any order:
| player.name | player.age |
| "Tim Duncan" | 42 |
When executing query:
"""
FETCH PROP ON player hash("Tony Parker") YIELD player.name, player.age
"""
Then the result should be, in any order, and the columns 0 should be hashed:
| VertexID | player.name | player.age |
| "Tony Parker" | "Tony Parker" | 36 |
Then the result should be, in any order:
| player.name | player.age |
| "Tony Parker" | 36 |
When executing query:
"""
LOOKUP ON player WHERE player.name == "Tim Duncan"
Expand All @@ -204,14 +204,14 @@ Feature: Delete int vid of tag
"""
FETCH PROP ON player hash("Tim Duncan") YIELD player.name, player.age
"""
Then the result should be, in any order, and the columns 0 should be hashed:
| VertexID | player.name | player.age |
Then the result should be, in any order:
| player.name | player.age |
When executing query:
"""
FETCH PROP ON player hash("Tony Parker") YIELD player.name, player.age
"""
Then the result should be, in any order, and the columns 0 should be hashed:
| VertexID | player.name | player.age |
Then the result should be, in any order:
| player.name | player.age |
When executing query:
"""
LOOKUP ON player WHERE player.name == "Tim Duncan"
Expand Down Expand Up @@ -241,9 +241,9 @@ Feature: Delete int vid of tag
"""
FETCH PROP ON team hash("Spurs") YIELD team.name
"""
Then the result should be, in any order, and the columns 0 should be hashed:
| VertexID | team.name |
| "Spurs" | "Spurs" |
Then the result should be, in any order:
| team.name |
| "Spurs" |
# delete one tag
When executing query:
"""
Expand All @@ -256,7 +256,7 @@ Feature: Delete int vid of tag
FETCH PROP ON team hash("Spurs") YIELD team.name
"""
Then the result should be, in any order:
| VertexID | team.name |
| team.name |
# delete tag from pipe and normal
When executing query:
"""
Expand All @@ -280,9 +280,9 @@ Feature: Delete int vid of tag
"""
FETCH PROP ON team hash("Spurs") YIELD team.name
"""
Then the result should be, in any order, and the columns 0 should be hashed:
| VertexID | team.name |
| "Spurs" | "Spurs" |
Then the result should be, in any order:
| team.name |
| "Spurs" |
# delete one tag
When executing query:
"""
Expand All @@ -295,7 +295,7 @@ Feature: Delete int vid of tag
FETCH PROP ON team hash("Spurs") YIELD team.name
"""
Then the result should be, in any order:
| VertexID | team.name |
| team.name |
# delete one tag from var and normal
When executing query:
"""
Expand Down
Loading

0 comments on commit 3e4407a

Please sign in to comment.