Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Add docker major version tag when releasing #2921

Merged
merged 6 commits into from
Sep 25, 2021
Merged
Changes from 1 commit
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
Prev Previous commit
Next Next commit
format python codes
yixinglu committed Sep 24, 2021
commit d8140b7682c8a0bb7713355b9349cf13b5e55bf2
5 changes: 5 additions & 0 deletions tests/tck/conftest.py
Original file line number Diff line number Diff line change
@@ -39,6 +39,7 @@
register_dict = {}
register_lock = threading.Lock()


def normalize_outline_scenario(request, name):
for group in example_pattern.findall(name):
fixval = request.getfixturevalue(group)
@@ -477,6 +478,7 @@ def check_plan(plan, graph_spaces):
differ = PlanDiffer(resp.plan_desc(), expect)
assert differ.diff(), differ.err_msg()


@when(parse("executing query via graph {index:d}:\n{query}"))
def executing_query(query, index, graph_spaces, session_from_first_conn_pool, session_from_second_conn_pool, request):
assert index < 2, "There exists only 0,1 graph: {}".format(index)
@@ -486,12 +488,14 @@ def executing_query(query, index, graph_spaces, session_from_first_conn_pool, se
else:
exec_query(request, ngql, session_from_second_conn_pool, graph_spaces)


@then(parse("the result should be, the first {n:d} records in order, and register {column_name} as a list named {key}:\n{result}"))
def result_should_be_in_order_and_register_key(n, column_name, key, request, result, graph_spaces):
assert n > 0, f"The records number should be an positive integer: {n}"
result_ds = cmp_dataset(request, graph_spaces, result, order=True, strict=True, contains=CmpType.CONTAINS, first_n_records=n)
register_result_key(request.node.name, result_ds, column_name, key)


def register_result_key(test_name, result_ds, column_name, key):
if column_name.encode() not in result_ds.column_names:
assert False, f"{column_name} not in result columns {result_ds.column_names}."
@@ -501,6 +505,7 @@ def register_result_key(test_name, result_ds, column_name, key):
register_dict[test_name + key] = val;
register_lock.release()


@when(parse("executing query, fill replace holders with element index of {indices} in {keys}:\n{query}"))
def executing_query_with_params(query, indices, keys, graph_spaces, session, request):
indices_list=[int(v) for v in indices.split(",")]