Added unstable option to tck_executor and any error checker in steps/errors.py.
Reviewers: buda, mislav.bradac Reviewed By: buda, mislav.bradac Differential Revision: https://phabricator.memgraph.io/D268
This commit is contained in:
parent
0000e83fc7
commit
0c5b2bdc8e
@ -14,6 +14,11 @@ def handle_error(context):
|
||||
assert(context.exception is not None)
|
||||
|
||||
|
||||
@then('an error should be raised')
|
||||
def error(context):
|
||||
handle_error(context)
|
||||
|
||||
|
||||
@then('a SyntaxError should be raised at compile time: NestedAggregation')
|
||||
def syntax_error(context):
|
||||
handle_error(context)
|
||||
|
@ -27,6 +27,8 @@ def parse_args():
|
||||
help="Test result output folder, default is results/.")
|
||||
argp.add_argument("--logging", default="DEBUG", choices=[
|
||||
"INFO", "DEBUG"], help="Logging level, default is DEBUG.")
|
||||
argp.add_argument("--unstable", action="store_true",
|
||||
help="Include unstable feature from features.")
|
||||
return argp.parse_args()
|
||||
|
||||
|
||||
@ -65,6 +67,9 @@ def main():
|
||||
behave_options.append("--stop")
|
||||
if args.no_side_effects:
|
||||
behave_options.append("--no-side-effects")
|
||||
if not args.unstable:
|
||||
behave_options.append("-e")
|
||||
behave_options.append("unstable*")
|
||||
behave_options.append("--database")
|
||||
behave_options.append(args.db)
|
||||
behave_options.append("--database-password")
|
||||
|
29
tck_engine/tests/memgraph_V1/features/unstable.feature
Normal file
29
tck_engine/tests/memgraph_V1/features/unstable.feature
Normal file
@ -0,0 +1,29 @@
|
||||
Feature: Unstable
|
||||
Scenario: Fail scenario:
|
||||
Given an empty graph
|
||||
When executing query:
|
||||
"""
|
||||
CREATE (a:A) CREATE (a:B)
|
||||
"""
|
||||
Then the result should be empty
|
||||
|
||||
Scenario: Set test:
|
||||
Given an empty graph
|
||||
And having executed:
|
||||
"""
|
||||
CREATE (a:A{x: 1}), (b:B{x: 2}), (c:C{x: 3}), (a)-[:T]->(b), (b)-[:T]->(c), (c)-[:T]->(a)
|
||||
"""
|
||||
And having executed:
|
||||
"""
|
||||
MATCH (d)--(e) WHERE abs(d.x - e.x)<=1 SET d.x=d.x+2, e.x=e.x+2
|
||||
"""
|
||||
When executing query:
|
||||
"""
|
||||
MATCH(x) RETURN x
|
||||
"""
|
||||
Then the result should be:
|
||||
| x |
|
||||
| (:A{x: 5}) |
|
||||
| (:B{x: 10}) |
|
||||
| (:C{x: 7}) |
|
||||
|
1101
tck_engine/tests/memgraph_V1/features/unstable_test03.feature
Normal file
1101
tck_engine/tests/memgraph_V1/features/unstable_test03.feature
Normal file
File diff suppressed because it is too large
Load Diff
Loading…
Reference in New Issue
Block a user