diff --git a/pgproto/src/server/CMakeLists.txt b/pgproto/src/server/CMakeLists.txt index 045e31bd8b24d06c075b4e2581d3d985c3488d99..b18a467e1d23e27515bc4bd5049ee0aef9b594a6 100644 --- a/pgproto/src/server/CMakeLists.txt +++ b/pgproto/src/server/CMakeLists.txt @@ -2,6 +2,6 @@ set(SERVER_SOURCES server.c ) -build_module(tcpserver ${SERVER_SOURCES}) -target_link_libraries(tcpserver +build_module(pgproto ${SERVER_SOURCES}) +target_link_libraries(pgproto PRIVATE tarantool postgres ${MSGPUCK_LIB}) diff --git a/pgproto/test/auth_test.py b/pgproto/test/auth_test.py index 9bf59d8e1fa82643e39bb5787ba4fe0fc4cdb6dc..f5ae037108408e5a44320cf81d574427fc12cd10 100644 --- a/pgproto/test/auth_test.py +++ b/pgproto/test/auth_test.py @@ -7,27 +7,27 @@ def start_pg_server(instance, host, service): start_pg_server_lua_code = f""" package.cpath="{os.environ['LUA_CPATH']}" net_box = require('net.box') - box.schema.func.create('tcpserver.server_start', {{language = 'C'}}) - box.schema.user.grant('guest', 'execute', 'function', 'tcpserver.server_start') + box.schema.func.create('pgproto.server_start', {{language = 'C'}}) + box.schema.user.grant('guest', 'execute', 'function', 'pgproto.server_start') box.cfg{{listen=3301}} caller = net_box:new(3301) - caller:call('tcpserver.server_start', {{ '{host}', '{service}' }}) + caller:call('pgproto.server_start', {{ '{host}', '{service}' }}) """ instance.eval(start_pg_server_lua_code) def stop_pg_server(instance): stop_pg_server_lua_code = f""" local net_box = require('net.box') - box.schema.func.create('tcpserver.server_stop', {{language = 'C'}}) - box.schema.user.grant('guest', 'execute', 'function', 'tcpserver.server_stop') + box.schema.func.create('pgproto.server_stop', {{language = 'C'}}) + box.schema.user.grant('guest', 'execute', 'function', 'pgproto.server_stop') box.cfg{{listen=3301}} local caller = net_box:new(3301) - caller:call('tcpserver.server_stop') + caller:call('pgproto.server_stop') - box.schema.func.drop('tcpserver.server_start') - box.schema.func.drop('tcpserver.server_stop') + box.schema.func.drop('pgproto.server_start') + box.schema.func.drop('pgproto.server_stop') """ instance.eval(stop_pg_server_lua_code) diff --git a/pgproto/test/simple_query_test.py b/pgproto/test/simple_query_test.py index 7ef697397886b9367b06f80bee923a7403de2e16..9f9d7e185b368987c49efcc81520bf0cf2fc517f 100644 --- a/pgproto/test/simple_query_test.py +++ b/pgproto/test/simple_query_test.py @@ -8,22 +8,22 @@ def start_pg_server(instance, host, service): start_pg_server_lua_code = f""" package.cpath="{os.environ['LUA_CPATH']}" - box.schema.func.create('tcpserver.server_start', {{ language = 'C' }}) - box.schema.user.grant('guest', 'execute', 'function', 'tcpserver.server_start') + box.schema.func.create('pgproto.server_start', {{ language = 'C' }}) + box.schema.user.grant('guest', 'execute', 'function', 'pgproto.server_start') - box.func['tcpserver.server_start']:call({{ '{host}', '{service}' }}) + box.func['pgproto.server_start']:call({{ '{host}', '{service}' }}) """ instance.eval(start_pg_server_lua_code) def stop_pg_server(instance): stop_pg_server_lua_code = f""" - box.schema.func.create('tcpserver.server_stop', {{language = 'C'}}) - box.schema.user.grant('guest', 'execute', 'function', 'tcpserver.server_stop') + box.schema.func.create('pgproto.server_stop', {{language = 'C'}}) + box.schema.user.grant('guest', 'execute', 'function', 'pgproto.server_stop') - box.func['tcpserver.server_stop']:call() + box.func['pgproto.server_stop']:call() - box.schema.func.drop('tcpserver.server_start') - box.schema.func.drop('tcpserver.server_stop') + box.schema.func.drop('pgproto.server_start') + box.schema.func.drop('pgproto.server_stop') """ instance.eval(stop_pg_server_lua_code)