Merging upstream version 4.2.0.
Signed-off-by: Daniel Baumann <daniel@debian.org>
This commit is contained in:
parent
7e05478097
commit
853c1070f9
14 changed files with 197 additions and 99 deletions
|
@ -51,6 +51,10 @@ Feature: run the cli,
|
|||
When we list databases
|
||||
then we see list of databases
|
||||
|
||||
Scenario: ping databases
|
||||
When we ping the database
|
||||
then we get a pong response
|
||||
|
||||
Scenario: run the cli with --username
|
||||
When we launch dbcli using --username
|
||||
and we send "\?" command
|
||||
|
|
|
@ -26,6 +26,19 @@ def step_see_list_databases(context):
|
|||
context.cmd_output = None
|
||||
|
||||
|
||||
@when("we ping the database")
|
||||
def step_ping_database(context):
|
||||
cmd = ["pgcli", "--ping"]
|
||||
context.cmd_output = subprocess.check_output(cmd, cwd=context.package_root)
|
||||
|
||||
|
||||
@then("we get a pong response")
|
||||
def step_get_pong_response(context):
|
||||
# exit code 0 is implied by the presence of cmd_output here, which
|
||||
# is only set on a successful run.
|
||||
assert context.cmd_output.strip() == b"PONG", f"Output was {context.cmd_output}"
|
||||
|
||||
|
||||
@when("we run dbcli")
|
||||
def step_run_cli(context):
|
||||
wrappers.run_cli(context)
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue