Skip to content
GitLab
Explore
Sign in
Register
Primary navigation
Search or go to…
Project
P
picodata
Manage
Activity
Members
Labels
Plan
Issues
Issue boards
Milestones
Code
Merge requests
Repository
Branches
Commits
Tags
Repository graph
Compare revisions
Snippets
Build
Pipelines
Jobs
Pipeline schedules
Artifacts
Deploy
Container Registry
Model registry
Analyze
Value stream analytics
Contributor analytics
CI/CD analytics
Repository analytics
Model experiments
Help
Help
Support
GitLab documentation
Compare GitLab plans
Community forum
Contribute to GitLab
Provide feedback
Keyboard shortcuts
?
Snippets
Groups
Projects
Show more breadcrumbs
core
picodata
Commits
25264bc3
Commit
25264bc3
authored
6 months ago
by
Dmitry Ivanov
Committed by
Maksim Kaitmazian
6 months ago
Browse files
Options
Downloads
Patches
Plain Diff
chore(pgproto): fix psql completion test
parent
aee2d68a
No related branches found
Branches containing commit
No related tags found
Tags containing commit
1 merge request
!1195
feat: support autocomplete for table names in psql
Pipeline
#49013
passed
6 months ago
Stage: test
Stage: stress-test
Stage: front-deploy
Changes
1
Pipelines
2
Hide whitespace changes
Inline
Side-by-side
Showing
1 changed file
test/pgproto/tabcompletion_test.py
+8
-23
8 additions, 23 deletions
test/pgproto/tabcompletion_test.py
with
8 additions
and
23 deletions
test/pgproto/tabcompletion_test.py
+
8
−
23
View file @
25264bc3
...
...
@@ -33,34 +33,19 @@ def test_tabcompletion(postgres: Postgres):
# connect using psql
psql
=
pexpect
.
spawn
(
command
=
"
psql
"
,
args
=
[
f
"
postgres://
{
user
}
:
{
password
}
@
{
host
}
:
{
port
}
?sslmode=disable
"
],
args
=
[
"
--quiet
"
,
"
--no-psqlrc
"
,
f
"
postgres://
{
user
}
:
{
password
}
@
{
host
}
:
{
port
}
?sslmode=disable
"
,
],
env
=
{
"
LC_ALL
"
:
"
C
"
},
encoding
=
"
utf-8
"
,
timeout
=
5
,
)
psql
.
logfile
=
sys
.
stdout
psql
.
expect_exact
(
"
psql
"
)
psql
.
expect_exact
(
'
Type
"
help
"
for help.
'
)
psql
.
expect_exact
(
"
=>
"
)
# request the completion by pressing TAB twice
psql
.
send
(
"
select * from
\t\t
"
)
suggestions
=
[
"
T
"
,
"
_pico_plugin_migration
"
,
"
_pico_service_route
"
,
"
_pico_index
"
,
"
_pico_privilege
"
,
"
_pico_table
"
,
"
_pico_instance
"
,
"
_pico_property
"
,
"
_pico_tier
"
,
"
_pico_peer_address
"
,
"
_pico_replicaset
"
,
"
_pico_user
"
,
"
_pico_plugin
"
,
"
_pico_routine
"
,
"
_pico_plugin_config
"
,
"
_pico_service
"
,
]
for
suggestion
in
suggestions
:
psql
.
expect_exact
(
suggestion
)
psql
.
expect_exact
(
'"
T
"'
)
psql
.
expect
(
"
_pico.*
"
)
This diff is collapsed.
Click to expand it.
Artur Sabirov
@a.sabirov
mentioned in merge request
docs!534 (merged)
·
6 months ago
mentioned in merge request
docs!534 (merged)
mentioned in merge request docs!534
Toggle commit list
Preview
0%
Loading
Try again
or
attach a new file
.
Cancel
You are about to add
0
people
to the discussion. Proceed with caution.
Finish editing this message first!
Save comment
Cancel
Please
register
or
sign in
to comment