Skip to content
Snippets Groups Projects
Commit feeb5afb authored by Dmitry E. Oboukhov's avatar Dmitry E. Oboukhov
Browse files

Merge branch 'master' of github.com:tarantool/tarantool

parents 41d4ee89 42eda622
No related merge requests found
TAP version 13
1..16
1..18
ok - console.listen started
ok - connect to console
ok - eval
......@@ -9,6 +9,8 @@ ok - set delimiter to ';'
ok - state.delimiter is ';'
ok - get delimiter is ';'
ok - clear delimiter
ok - remote network error
ok - remote access denied
ok - remote connect
ok - remote eval
ok - remote state.remote.host
......
......@@ -19,13 +19,9 @@ box.cfg{
--
local EOL = {"\n%.%.%.\n"}
-- Add permissions to execute `dostring` for `guest`
box.schema.func.create('dostring')
box.schema.user.grant('guest', 'execute', 'function', 'dostring')
test = tap.test("console")
test:plan(16)
test:plan(18)
-- Start console and connect to it
local server = console.listen(CONSOLE_SOCKET)
......@@ -58,6 +54,21 @@ client:write("require('console').delimiter('');\n")
test:is(yaml.decode(client:readline(EOL)), '', "clear delimiter")
-- Connect to iproto console (CALL)
client:write(string.format("require('console').connect('unix/', '/')\n"))
-- error: Connection is not established
test:ok(yaml.decode(client:readline(EOL))[1].error:find('not established'),
'remote network error')
client:write(string.format("require('console').connect('unix/', '%s')\n",
IPROTO_SOCKET))
-- error: Execute access denied for user 'guest' to function 'dostring
test:ok(yaml.decode(client:readline(EOL))[1].error:find('access denied'),
'remote access denied')
-- Add permissions to execute `dostring` for `guest`
box.schema.func.create('dostring')
box.schema.user.grant('guest', 'execute', 'function', 'dostring')
client:write(string.format("require('console').connect('unix/', '%s')\n",
IPROTO_SOCKET))
test:is(yaml.decode(client:readline(EOL)), '', "remote connect")
......
0% Loading or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment