summaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
-rw-r--r--changelog.rst8
-rw-r--r--tests/features/crud_database.feature2
-rw-r--r--tests/features/environment.py1
-rw-r--r--tests/features/steps/step_definitions.py15
4 files changed, 20 insertions, 6 deletions
diff --git a/changelog.rst b/changelog.rst
index 8d2a36ea..3c54d0eb 100644
--- a/changelog.rst
+++ b/changelog.rst
@@ -1,3 +1,11 @@
+0.19.1
+======
+
+BugFixe:
+---------
+
+* Fix an autocompletion bug that was crashing the completion engine when unknown keyword is entered. (Thanks: `Darik Gamble`_)
+
0.19.0
======
diff --git a/tests/features/crud_database.feature b/tests/features/crud_database.feature
index 6657e391..8b40a0ec 100644
--- a/tests/features/crud_database.feature
+++ b/tests/features/crud_database.feature
@@ -9,6 +9,8 @@ Feature: manipulate databases:
then we see database created
when we drop database
then we see database dropped
+ when we connect to postgres
+ then we see database connected
when we send "ctrl + d"
then pgcli exits
diff --git a/tests/features/environment.py b/tests/features/environment.py
index 3e3e1f51..25b3acd4 100644
--- a/tests/features/environment.py
+++ b/tests/features/environment.py
@@ -29,6 +29,7 @@ def before_all(context):
'user': context.config.userdata.get('pg_test_user', 'postgres'),
'pass': context.config.userdata.get('pg_test_pass', None),
'dbname': db_name_full,
+ 'dbname_tmp': db_name_full + '_tmp',
}
# Store old env vars.
diff --git a/tests/features/steps/step_definitions.py b/tests/features/steps/step_definitions.py
index cb2bd8c0..4b5da258 100644
--- a/tests/features/steps/step_definitions.py
+++ b/tests/features/steps/step_definitions.py
@@ -34,7 +34,7 @@ def step_wait_prompt(context):
"""
Make sure prompt is displayed.
"""
- context.cli.expect('{0}> '.format(context.conf['dbname']))
+ context.cli.expect('{0}> '.format(context.conf['dbname']), timeout=5)
@when('we send "ctrl + d"')
@@ -59,9 +59,11 @@ def step_db_create(context):
"""
Send create database.
"""
- context.cli.sendline('create database pgcli_behave_tmp;')
+ context.cli.sendline('create database {0};'.format(
+ context.conf['dbname_tmp']))
+
context.response = {
- 'database_name': 'pgcli_behave_tmp'
+ 'database_name': context.conf['dbname_tmp']
}
@@ -70,7 +72,8 @@ def step_db_drop(context):
"""
Send drop database.
"""
- context.cli.sendline('drop database pgcli_behave_tmp;')
+ context.cli.sendline('drop database {0};'.format(
+ context.conf['dbname_tmp']))
@when('we create table')
@@ -143,7 +146,7 @@ def step_wait_exit(context):
"""
Make sure the cli exits.
"""
- context.cli.expect(pexpect.EOF)
+ context.cli.expect(pexpect.EOF, timeout=5)
@then('we see pgcli prompt')
@@ -151,7 +154,7 @@ def step_see_prompt(context):
"""
Wait to see the prompt.
"""
- context.cli.expect('{0}> '.format(context.conf['dbname']))
+ context.cli.expect('{0}> '.format(context.conf['dbname']), timeout=5)
@then('we see help output')