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
fb695c78
Commit
fb695c78
authored
1 year ago
by
Kurdakov Alexander
Browse files
Options
Downloads
Patches
Plain Diff
feat: sql language by default on clients
parent
e49f56e4
No related branches found
Branches containing commit
No related tags found
4 merge requests
!807
Draft: fix: remove deprecated message for install nodejs
,
!783
feat: sql language by default on clients
,
!778
sbroad: refactoring of the table constructor API
,
!757
fix: more patches for gamayun
Pipeline
#29429
failed
1 year ago
Stage: test
Changes
2
Pipelines
2
Hide whitespace changes
Inline
Side-by-side
Showing
2 changed files
src/cli/connect.lua
+3
-0
3 additions, 0 deletions
src/cli/connect.lua
test/int/test_cli_connect.py
+6
-0
6 additions, 0 deletions
test/int/test_cli_connect.py
with
9 additions
and
0 deletions
src/cli/connect.lua
+
3
−
0
View file @
fb695c78
...
...
@@ -15,6 +15,9 @@ console.on_start(function(self)
self
:
print
(
string.format
(
"uri: %s"
,
urilib
.
format
(
urilib
.
parse
(
raw_uri
),
false
)))
os.exit
(
1
)
end
self
:
eval
(
"
\\
set language sql"
)
-- We should only set this after we try to connect, because
-- `console.connect` will call this before throwing eval errors
console
.
on_client_disconnect
(
function
(
_
)
...
...
This diff is collapsed.
Click to expand it.
test/int/test_cli_connect.py
+
6
−
0
View file @
fb695c78
...
...
@@ -32,6 +32,7 @@ def test_connect_testuser(i1: Instance):
cli
.
expect_exact
(
f
"
connected to
{
i1
.
host
}
:
{
i1
.
port
}
"
)
cli
.
expect_exact
(
f
"
{
i1
.
host
}
:
{
i1
.
port
}
>
"
)
cli
.
sendline
(
"
\\
set language lua
"
)
cli
.
sendline
(
"
box.session.user()
"
)
cli
.
expect_exact
(
"
---
\r\n
"
)
cli
.
expect_exact
(
"
- testuser
\r\n
"
)
...
...
@@ -58,6 +59,7 @@ def test_connect_user_host_port(i1: Instance):
cli
.
expect_exact
(
f
"
connected to
{
i1
.
host
}
:
{
i1
.
port
}
"
)
cli
.
expect_exact
(
f
"
{
i1
.
host
}
:
{
i1
.
port
}
>
"
)
cli
.
sendline
(
"
\\
set language lua
"
)
cli
.
sendline
(
"
box.session.user()
"
)
cli
.
expect_exact
(
"
---
\r\n
"
)
cli
.
expect_exact
(
"
- testuser
\r\n
"
)
...
...
@@ -81,6 +83,7 @@ def test_connect_guest(i1: Instance):
cli
.
expect_exact
(
f
"
connected to
{
i1
.
host
}
:
{
i1
.
port
}
"
)
cli
.
expect_exact
(
f
"
{
i1
.
host
}
:
{
i1
.
port
}
>
"
)
cli
.
sendline
(
"
\\
set language lua
"
)
cli
.
sendline
(
"
box.session.user()
"
)
cli
.
expect_exact
(
"
---
\r\n
"
)
cli
.
expect_exact
(
"
- guest
\r\n
"
)
...
...
@@ -159,6 +162,7 @@ def test_connect_auth_type_ok(i1: Instance):
cli
.
expect_exact
(
f
"
connected to
{
i1
.
host
}
:
{
i1
.
port
}
"
)
cli
.
expect_exact
(
f
"
{
i1
.
host
}
:
{
i1
.
port
}
>
"
)
cli
.
sendline
(
"
\\
set language lua
"
)
cli
.
sendline
(
"
box.session.user()
"
)
cli
.
expect_exact
(
"
---
\r\n
"
)
cli
.
expect_exact
(
"
- testuser
\r\n
"
)
...
...
@@ -286,6 +290,7 @@ def test_connect_unix_ok(cluster: Cluster):
cli
.
expect_exact
(
"
connected to unix/:./console.sock
"
)
cli
.
expect_exact
(
"
unix/:./console.sock>
"
)
cli
.
sendline
(
"
\\
set language lua
"
)
cli
.
sendline
(
"
box.session.user()
"
)
cli
.
expect_exact
(
"
---
\r\n
"
)
cli
.
expect_exact
(
"
- admin
\r\n
"
)
...
...
@@ -362,6 +367,7 @@ def test_connect_with_password_from_file(i1: Instance, binary_path: str):
cli
.
expect_exact
(
f
"
connected to
{
i1
.
host
}
:
{
i1
.
port
}
"
)
cli
.
expect_exact
(
f
"
{
i1
.
host
}
:
{
i1
.
port
}
>
"
)
cli
.
sendline
(
"
\\
set language lua
"
)
cli
.
sendline
(
"
box.session.user()
"
)
cli
.
expect_exact
(
"
---
\r\n
"
)
cli
.
expect_exact
(
"
- testuser
\r\n
"
)
...
...
This diff is collapsed.
Click to expand it.
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