Tarantool development patches archive
 help / color / mirror / Atom feed
* [tarantool-patches] [socket 1/1] socket: Fix socket test
@ 2018-05-08 11:03 Ilya Markov
  2018-05-08 11:20 ` [tarantool-patches] " Konstantin Osipov
  0 siblings, 1 reply; 2+ messages in thread
From: Ilya Markov @ 2018-05-08 11:03 UTC (permalink / raw)
  To: georgy; +Cc: tarantool-patches

In sequential launch of app-tap/console.test, tests failed with "User
exists" and binding errors.

Make sockets path relative.
Add users cleanup.

Relates #3168
---
branch: gh-3168-fix-console-test
 test/app-tap/console.test.lua | 13 ++++++++-----
 1 file changed, 8 insertions(+), 5 deletions(-)

diff --git a/test/app-tap/console.test.lua b/test/app-tap/console.test.lua
index 48d28bd..fecfa52 100755
--- a/test/app-tap/console.test.lua
+++ b/test/app-tap/console.test.lua
@@ -7,12 +7,12 @@ local yaml = require('yaml')
 local fiber = require('fiber')
 local ffi = require('ffi')
 local log = require('log')
+local fio = require('fio')
 
--- Supress console log messages
+-- Suppress console log messages
 log.level(4)
-
-local CONSOLE_SOCKET = '/tmp/tarantool-test-console.sock'
-local IPROTO_SOCKET = '/tmp/tarantool-test-iproto.sock'
+local CONSOLE_SOCKET = fio.pathjoin(fio.cwd(), 'tarantool-test-console.sock')
+local IPROTO_SOCKET = fio.pathjoin(fio.cwd(), 'tarantool-test-iproto.sock')
 os.remove(CONSOLE_SOCKET)
 os.remove(IPROTO_SOCKET)
 
@@ -64,7 +64,6 @@ box.cfg{
     memtx_memory = 107374182,
     log="tarantool.log",
 }
-
 -- Connect to iproto console (CALL)
 client:write(string.format("require('console').connect('/')\n"))
 -- error: Connection is not established
@@ -242,8 +241,12 @@ server:close()
 box.session.on_connect(nil, console_on_connect)
 box.session.on_disconnect(nil, console_on_disconnect)
 box.session.on_auth(nil, console_on_auth)
+box.schema.user.drop('test')
+box.schema.user.drop('test2')
 session_id = nil
 triggers_ran = nil
+os.remove(CONSOLE_SOCKET)
+os.remove(IPROTO_SOCKET)
 
 test:check()
 
-- 
2.7.4

^ permalink raw reply	[flat|nested] 2+ messages in thread

end of thread, other threads:[~2018-05-08 11:20 UTC | newest]

Thread overview: 2+ messages (download: mbox.gz / follow: Atom feed)
-- links below jump to the message on this page --
2018-05-08 11:03 [tarantool-patches] [socket 1/1] socket: Fix socket test Ilya Markov
2018-05-08 11:20 ` [tarantool-patches] " Konstantin Osipov

This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox