1
0
Fork 0

Merging upstream version 1.29.2.

Signed-off-by: Daniel Baumann <daniel@debian.org>
This commit is contained in:
Daniel Baumann 2025-02-09 19:16:42 +01:00
parent 3180ec4213
commit f15fe4f59f
Signed by: daniel
GPG key ID: FBB4F0E80A80222F
68 changed files with 3723 additions and 3336 deletions

View file

@ -6,41 +6,42 @@ import wrappers
from utils import parse_cli_args_to_dict
@when('we run dbcli with {arg}')
@when("we run dbcli with {arg}")
def step_run_cli_with_arg(context, arg):
wrappers.run_cli(context, run_args=parse_cli_args_to_dict(arg))
@when('we execute a small query')
@when("we execute a small query")
def step_execute_small_query(context):
context.cli.sendline('select 1')
context.cli.sendline("select 1")
@when('we execute a large query')
@when("we execute a large query")
def step_execute_large_query(context):
context.cli.sendline(
'select {}'.format(','.join([str(n) for n in range(1, 50)])))
context.cli.sendline("select {}".format(",".join([str(n) for n in range(1, 50)])))
@then('we see small results in horizontal format')
@then("we see small results in horizontal format")
def step_see_small_results(context):
wrappers.expect_pager(context, dedent("""\
wrappers.expect_pager(
context,
dedent("""\
+---+\r
| 1 |\r
+---+\r
| 1 |\r
+---+\r
\r
"""), timeout=5)
wrappers.expect_exact(context, '1 row in set', timeout=2)
"""),
timeout=5,
)
wrappers.expect_exact(context, "1 row in set", timeout=2)
@then('we see large results in vertical format')
@then("we see large results in vertical format")
def step_see_large_results(context):
rows = ['{n:3}| {n}'.format(n=str(n)) for n in range(1, 50)]
expected = ('***************************[ 1. row ]'
'***************************\r\n' +
'{}\r\n'.format('\r\n'.join(rows) + '\r\n'))
rows = ["{n:3}| {n}".format(n=str(n)) for n in range(1, 50)]
expected = "***************************[ 1. row ]" "***************************\r\n" + "{}\r\n".format("\r\n".join(rows) + "\r\n")
wrappers.expect_pager(context, expected, timeout=10)
wrappers.expect_exact(context, '1 row in set', timeout=2)
wrappers.expect_exact(context, "1 row in set", timeout=2)