* Serge Petrenko <sergepetrenko@xxxxxxxxxxxxx> [18/07/16 15:14]:
Tarantoolctl enter didn't check whether connection to a socket was established
if a socket file existed. It just executed a local console.
Fix this by adding a check and an error, also add a test case.
Closes #3364
extra/dist/tarantoolctl.in | 19 ++++++++++++-------
test/app-tap/tarantoolctl.test.lua | 29 ++++++++++++++++++++++++++++-
2 files changed, 40 insertions(+), 8 deletions(-)
+ local status, err = pcall(function()
+ test:test("check error codes in case of enter", function(test_i)
+ test_i:plan(6)
+ check_ok(test_i, dir, 'enter', 'script', 1, nil, "Can't connect
to")
+ check_ok(test_i, dir, 'start', 'script', 0)
+ os.execute(("kill $(cat %s/script.pid)"):format(dir))
+ check_ok(test_i, dir, 'enter', 'script', 1, nil, "Can't connect
to")
+ check_ok(test_i, dir, 'stop','script', 0)
+ end)
+ end)