Skip to content
GitLab
Explore
Sign in
Register
Primary navigation
Search or go to…
Project
T
tarantool
Manage
Activity
Members
Labels
Plan
Issues
Issue boards
Milestones
Wiki
Code
Merge requests
Repository
Branches
Commits
Tags
Repository graph
Compare revisions
Snippets
Build
Pipelines
Jobs
Pipeline schedules
Artifacts
Deploy
Releases
Package Registry
Container Registry
Model registry
Operate
Environments
Terraform modules
Monitor
Incidents
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
tarantool
Commits
ce3d565f
Commit
ce3d565f
authored
10 years ago
by
Dmitry E. Oboukhov
Browse files
Options
Downloads
Patches
Plain Diff
net.box requires define password AND user. closes #545
parent
266466e1
No related branches found
Branches containing commit
No related tags found
Tags containing commit
No related merge requests found
Changes
3
Hide whitespace changes
Inline
Side-by-side
Showing
3 changed files
src/lua/box_net_box.lua
+11
-0
11 additions, 0 deletions
src/lua/box_net_box.lua
test/box/box.net.box.result
+9
-0
9 additions, 0 deletions
test/box/box.net.box.result
test/box/box.net.box.test.lua
+6
-0
6 additions, 0 deletions
test/box/box.net.box.test.lua
with
26 additions
and
0 deletions
src/lua/box_net_box.lua
+
11
−
0
View file @
ce3d565f
...
...
@@ -351,10 +351,21 @@ local remote_methods = {
self
.
host
=
host
self
.
port
=
port
self
.
opts
=
opts
if
self
.
opts
==
nil
then
self
.
opts
=
{}
end
if
self
.
opts
.
user
~=
nil
and
self
.
opts
.
password
==
nil
then
box
.
error
(
box
.
error
.
PROC_LUA
,
"net.box: password is not defined"
)
end
if
self
.
opts
.
user
==
nil
and
self
.
opts
.
password
~=
nil
then
box
.
error
(
box
.
error
.
PROC_LUA
,
"net.box: user is not defined"
)
end
if
self
.
host
==
nil
then
self
.
host
=
'localhost'
end
...
...
This diff is collapsed.
Click to expand it.
test/box/box.net.box.result
+
9
−
0
View file @
ce3d565f
...
...
@@ -573,3 +573,12 @@ cnc:call('123')
---
- error: '[string "123()"]:1: unexpected symbol near ''123'''
...
-- #545 user or password is not defined
remote:new(LISTEN.host, LISTEN.service, { user = 'test' })
---
- error: 'net.box: password is not defined'
...
remote:new(LISTEN.host, LISTEN.service, { password = 'test' })
---
- error: 'net.box: user is not defined'
...
This diff is collapsed.
Click to expand it.
test/box/box.net.box.test.lua
+
6
−
0
View file @
ce3d565f
...
...
@@ -223,3 +223,9 @@ cnc:call('console_unpack_test', 1)
cn
:
call
(
'123'
)
cnc
:
call
(
'123'
)
-- #545 user or password is not defined
remote
:
new
(
LISTEN
.
host
,
LISTEN
.
service
,
{
user
=
'test'
})
remote
:
new
(
LISTEN
.
host
,
LISTEN
.
service
,
{
password
=
'test'
})
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