Changelog
- Fixed a bug when a test Tarantool server could not find Lua modules installed
from rocks in the current test directory or its ascendants.
To avoid compatibility issues with the old behavior, the
setsearchrootserver option was added (gh-450).
- Fixed a bug when an error thrown by a function executed with
server:exec()in a Tarantool application thread was lost (gh-447).
Added a simple line-by-line diff to
t.assert_equals()andt.assert_covers()failure messages (gh-412).Fixed a bug when server initialization didn’t reset artifact handling, causing stale artifacts to persist after server restarts (gh-409).
Fixed a bug when the JUnit reporter generated invalid XML for parameterized tests with string arguments (gh-407).
Group and suite hooks must now be registered using the call-style API. Use:
before_each(function() ... end)after_each(function() ... end)before_all(function() ... end)after_all(function() ... end)before_suite(function() ... end)after_suite(function() ... end)before_test('name', function() ... end)after_test('name', function() ... end)
Assigning hooks as fields (for example,
group.before_each = fnorluatest.before_suite = fn) is no longer allowed and results in an error with a descriptive message. Legacygroup.setupandgroup.teardownare no longer supported; usebefore_each/after_eachinstead (gh-390).
- Fixed a bug when
assert_coversdidn’t check array items for coverage and instead treated arrays as scalars (gh-439).
- Fixed a bug when
assert_coverstreats arrays as maps (gh-405). - Added the ability to keep and adjust cluster declarative configuration
with
cluster:modify_config()and apply it later viacluster:apply_config_changes()without passing an explicit configuration (gh-426). - Added an option to create
Clusterobjects without global hook management, allowing tests to keep clusters alive between test runs (gh-414). - Fixed a bug where URI search would terminate prematurely when multiple replicasets existed (gh-427).
- Fixed
cbuilder:set_instance_option()to reuse existing instances found in a provided configuration and error when a target instance is missing. Also,cbuilder:add_instance()now rejects duplicate instance names across groups and replicasets (gh-404).
- Fixed a bug when
server:grep_log()failed to find a string logged inserver:exec()called immediately before it (gh-421). - Fixed a bug when it wasn’t possible to reload the cluster config with
cluster:reload()after removing an instance withcluster:sync(). Also added an option tocluster:sync()to start/stop added/removed instances (gh-423).
- Added logging to unified file (gh-324).
- Added memory leak detection during server process execution (gh-349).
- Added
assert_error_covers. - Added more logs (gh-326).
- Added
justrunhelper as a tarantool runner and output catcher (gh-365). - Changed error message for too long Unix domain socket paths (gh-341).
- Added
cbuilderhelper as a declarative configuration builder (gh-366). - Made
assert_error_*additionally check error trace if required. - Added
--list-test-casesand--run-test-caseCLI options. - Introduced preloaded hooks (gh-380).
- Added
treegenhelper as a tree generator (gh-364). - Added support for declarative configuration to
server.lua(gh-367). - Made
assert_coversrecursive (gh-379). - Added alias
--no-capturefor the option-c(gh-391). - Fixed reporting of an assertion failure in
Server:exec()in case verbose error serialization is enabled in Tarantool (gh-376). - Added
assert_items_exclude. - Stripped useless
...lines from error trace. - Fixed error trace reporting for functions executed with
Server:exec()(gh-396). - Removed pretty-printing of
luatest.logarguments. - Added
clusterhelper as a tool for managing a Tarantool cluster (gh-368). - Fixed
Server:grep_log()to work with a server instance started using theclusterhelper (gh-389). - Fixed
Server:grep_log()to work with a stopped server instance (gh-397).
- Fixed incorrect Unix domain socket path length check (gh-341).
- Now
net_box_urican be accepted as a table (gh-342). - Fixed returning values from
Server:exec()if some of them are nil (gh-350). - Introduce
luatest.loghelper (gh-326).
- Extend
server.luaAPI:- Update parameters of the
Server:new()function: - Thealiasparameter defaults to „server“. - Thecommandparameter is optional. - Theworkdirparameter is optional. - New parameterdatadir(optional). - New parameterbox_cfg(optional). - Add waiting until the started server is ready.
- Add waiting until the process of the stopped server is terminated.
- Add new functions:
-
Server.build_listen_uri()-Server:drop()-Server:wait_until_ready()-Server:get_instance_id()-Server:get_instance_uuid()-Server:grep_log()-Server:assert_follows_upstream()-Server:get_election_term()-Server:wait_for_election_term()-Server:wait_for_election_state()-Server:wait_for_election_leader()-Server:wait_until_election_leader_found()-Server:get_synchro_queue_term()-Server:wait_for_synchro_queue_term()-Server:play_wal_until_synchro_queue_is_busy()-Server:get_vclock()-Server:get_downstream_vclock()-Server:wait_for_vclock()-Server:wait_for_downstream_to()-Server:wait_for_vclock_of()-Server:update_box_cfg()-Server:get_box_cfg()
- Update parameters of the
- Add new module
replica_proxy.lua. - Add new module
replica_set.lua. - Add new module
tarantool.lua. - Check docs generation with LDoc.
- Add the
--repeat-group(-R) option to run tests in a circle within the group. - Forbid negative values for the
--repeat(-r) option. - Change the
coverage_reportparameter type to boolean in theServer:new()function. - Print Tarantool version used by luatest.
- Auto-require the
luatestmodule in theServer:exec()function where it is available via the corresponding upvalue. - Raise an error when non-array arguments passed to the
Server:exec()function. - Save server artifacts (logs, snapshots, etc.) to the
${VARDIR}/artifactsdirectory if the test fails. - Fix requiring the internal test helper when running tests.
- Fix collecting coverage if the tarantool binary has a suffix.
- Fix invalid arguments logging in some assertions.
- Fix confusing error message from
assert_not_equalsfunction. - Fix confusing error message from
assert_items_equalsfunction. - Fix confusing error message from
assert_items_includefunction. - Print
(no reason specified)message instead ofnilvalue when the test is skipped and no reason is specified. - Check
net_box_uriparam is less than max Unix domain socket path length. - Change test run summary report: use verbs in past simple tense (succeeded, failed, xfailed, etc.) instead of nouns (success(es), fail(s), xfail(s), etc.)
- Add
after_testandbefore_testhooks. - Add tap version to the output.
- New
restartserver method. - Add new
evalandcallserver methods for convenient net_box calls. - Server can use a unix socket as a listen port.
- Add
TARANTOOL_ALIASin the server env space. - Server args are updated on start.
- Add
_le,_lt,_ge,_gtassertions. - Write execution time for each test in the verbose mode.
- When capture is disabled and verbose mode is on test names are printed twice: at the start and at the end with result.
assert_error_msg_assertions print return values if no error is generated.- Fix
--repeatrunner option.
- Throw parser error when .json is accessed on response with invalid body.
- Set
Content-Type: application/jsonfor:http_request(..., {json = ...})requests.
- Assertions pretty-prints non-string extra messages (useful for custom errors as tables).
- String values in errors are printed as valid Lua strings (with
%qformatter). - Add
TARANTOOL_DIRto rockspec build.variables - Replace
--errorand--failureoptions with--fail-fast. - Fix stripping luatest trace from backtrace.
- Fix luarocks 3 test engine installation.
assert_istreatsbox.NULLandnilas different values.- Add luacov integration.
- Fix
assert_items_equalsfor repeated values. Add support fortupleitems. - Add
assert_items_includematcher. assert_equalsuses same comparison rules for nested values.- Fix generated group names when running files within specific directory.
- Fix not working
--exclude,--patternoptions - Fix error messages for
*_coversmatchers - Raise error when
group()is called with existing group name. - Allow dot in group name.
- Prevent using
/in group name. - Decide group name from filename for
group()call without args. assertreturns input values.assert[_not]_equalsworks for Tarantool’s box.tuple.- Print tables in lua-compatible way in errors.
- Fix performance issue with large errors messages.
- Unify hooks definition: group hooks are defined via function calls.
- Keep running other groups when group hook failed.
- Prefix and colorize captured output.
- Fix numeric assertions for cdata values.
- Make –shuffle option accept
group,all,nonevalues - Replace
rawoption forServer:http_requestwithraise. - Remove not documented methods inherited from luaunit.
- Colorize report.
- Fix issue with crashes in capture.
- Do not raise error for 2xx responses in Server:http_request
- Don’t run suite hooks when suite is not going to be run.
- Gracefully shutdown even when luanit calls
os.exit. - Show failed tests summary.
- Capture works with large outputs.
- GC’ed processes are killed automatically.
- Print captured output when suite/group hook fails.
- Rename Server:console to Server:net_box.
- Use real time instead of CPU time for duration.
- LDoc comments.
- Make assertions box.NULL aware.
- Luarocks 3 tests engine.
assert_coversmatcher.