test: fix import and usage luatest module
After adding the autorequiring luatest [1,2], there is no need to use the following approach now: ``` local t = require('luatest') local g = t.group() server:exec(function() local t = require('luatest') -- duplicate t.assert(...) end) ``` Modern approach looks like: ``` local t = require('luatest') local g = t.group() -- `t` already available in the remote server server:exec(function() t.assert(...) end) -- also it works with any variable local my_custom_t = require('luatest') server:exec(function() my_custom_t.assert(...) -- already available end) ``` [1] tarantool/luatest#277 [2] tarantool/luatest#289 Part of tarantool/luatest#233 NO_DOC=test fix NO_TEST=test fix NO_CHANGELOG=test fix (cherry picked from commit 98dd8e69)
Showing
- test/app-luatest/digest_crc32_recording_test.lua 1 addition, 0 deletionstest/app-luatest/digest_crc32_recording_test.lua
- test/app-luatest/fiber_parent_backtrace_test.lua 0 additions, 2 deletionstest/app-luatest/fiber_parent_backtrace_test.lua
- test/app-luatest/gh_4963_fio_pread_err_msg_test.lua 1 addition, 1 deletiontest/app-luatest/gh_4963_fio_pread_err_msg_test.lua
- test/app-luatest/gh_5747_crash_multiple_args_test.lua 1 addition, 0 deletionstest/app-luatest/gh_5747_crash_multiple_args_test.lua
- test/app-luatest/gh_6305_autocomplete_metamethod_test.lua 2 additions, 1 deletiontest/app-luatest/gh_6305_autocomplete_metamethod_test.lua
- test/app-luatest/gh_6817_console_memory_leak_test.lua 1 addition, 0 deletionstest/app-luatest/gh_6817_console_memory_leak_test.lua
- test/app-luatest/gh_7210_backtrace_for_fiber_obj_info_test.lua 1 addition, 0 deletions...app-luatest/gh_7210_backtrace_for_fiber_obj_info_test.lua
- test/app-luatest/gh_7273_dt_new_err_on_cdata_test.lua 1 addition, 1 deletiontest/app-luatest/gh_7273_dt_new_err_on_cdata_test.lua
- test/app-luatest/gh_7288_console_flavours_vs_txn_test.lua 0 additions, 4 deletionstest/app-luatest/gh_7288_console_flavours_vs_txn_test.lua
- test/app-luatest/gh_7479_bug_fix_uri_lib_test.lua 2 additions, 1 deletiontest/app-luatest/gh_7479_bug_fix_uri_lib_test.lua
- test/app-luatest/gh_7489_concurrent_fiber_join_test.lua 1 addition, 0 deletionstest/app-luatest/gh_7489_concurrent_fiber_join_test.lua
- test/app-luatest/gh_7495_tarantool_build_target_test.lua 1 addition, 0 deletionstest/app-luatest/gh_7495_tarantool_build_target_test.lua
- test/app-luatest/gh_8083_fatal_signal_handler_test.lua 1 addition, 0 deletionstest/app-luatest/gh_8083_fatal_signal_handler_test.lua
- test/app-luatest/http_client_test.lua 1 addition, 0 deletionstest/app-luatest/http_client_test.lua
- test/app-luatest/interval_test.lua 2 additions, 1 deletiontest/app-luatest/interval_test.lua
- test/app-luatest/msgpack_test.lua 1 addition, 0 deletionstest/app-luatest/msgpack_test.lua
- test/app-luatest/prbuf_test.lua 1 addition, 0 deletionstest/app-luatest/prbuf_test.lua
- test/app-luatest/system_fiber_test.lua 3 additions, 3 deletionstest/app-luatest/system_fiber_test.lua
- test/app-luatest/tnt_internal_symbol_test.lua 1 addition, 0 deletionstest/app-luatest/tnt_internal_symbol_test.lua
- test/box-luatest/alter_with_compression_test.lua 0 additions, 4 deletionstest/box-luatest/alter_with_compression_test.lua
Loading
Please register or sign in to comment