-
Notifications
You must be signed in to change notification settings - Fork 11
Open
Labels
featureA new functionalityA new functionality
Description
luatest
has a parametrization feature. Test parameters also used by luatest
for building testcase name.
However, parameters can contain symbols not allowed by luatest
:
sergeyb@pony:~/sources/MRG/tarantool$ luatest -v test/app-luatest/uri_unit_test.lua ...ces/MRG/tarantool/test-run/lib/luatest/luatest/group.lua:61: Group name must not contain `/`: uri_url_encode.url:"/".url_encoded:"%2F"
stack traceback:
...s/MRG/tarantool/test-run/lib/luatest/luatest/capture.lua:144: in function <...s/MRG/tarantool/test-run/lib/luatest/luatest/captur
e.lua:138>
[C]: in function 'error'
...ces/MRG/tarantool/test-run/lib/luatest/luatest/group.lua:61: in function 'initialize'
...ces/MRG/tarantool/test-run/lib/luatest/luatest/class.lua:40: in function 'new'
.../tarantool/test-run/lib/luatest/luatest/parametrizer.lua:78: in function 'parametrize'
...rces/MRG/tarantool/test-run/lib/luatest/luatest/init.lua:49: in function 'group'
...sources/MRG/tarantool/test/app-luatest/uri_unit_test.lua:95: in main chunk
[C]: in function 'require'
<stripped>
There are at least two workarounds:
- traverse table with parameters inside a test itself, see example - https://github.com/tarantool/tarantool/blob/dc147ec9190fc8bbbe56ce8a4a1718fbf8b03484/test/app-luatest/http_client_unit_test.lua#L62-L102
- parametrize test manually, see example in CRUD tests - https://github.com/tarantool/crud/blob/f1b6a12188f3cd4278fb879afc676b4cd5b5f3ec/test/integration/stats_test.lua#L574-L672
I suggest encoding a problem part of testcase name to base641 to avoid such issues.
Footnotes
Metadata
Metadata
Assignees
Labels
featureA new functionalityA new functionality