Skip to content

Commit 7bcc1a1

Browse files
count sql builtins
1 parent ae59c68 commit 7bcc1a1

File tree

1 file changed

+11
-3
lines changed

1 file changed

+11
-3
lines changed

test/suites/lib/tarantool_python_ci.lua

+11-3
Original file line numberDiff line numberDiff line change
@@ -198,6 +198,14 @@ clean = function()
198198
box.schema.func.drop(prop.name)
199199
end)
200200

201+
local sql_builtin_func_count = box.space._func:pairs():map(function(tuple)
202+
local lang = tuple[_FUNC_LANGUAGE]
203+
if lang == 'SQL_BUILTIN' then
204+
return 1
205+
end
206+
return 0
207+
end):sum()
208+
201209
cleanup_cluster()
202210

203211
local cleanup_list = function(list, allowed)
@@ -340,9 +348,9 @@ clean = function()
340348
local user_count = box.space._user:count()
341349
assert(user_count == 4 or user_count == 5,
342350
'box.space._user:count() should be 4 (1.10) or 5 (2.0)')
343-
local func_count = box.space._func:count()
344-
assert(func_count == 1 or func_count == 67,
345-
('box.space._func:count() should be 1 (1.10 and >= 2.10) or 67 (>= 2.2.1, < 2.10), %d get'):format(func_count))
351+
assert(box.space._func:count() == 1 + sql_builtin_func_count,
352+
'box.space._func:count() should be 1 (1.10 and >= 2.10)' ..
353+
' or 1 + count of SQL_BUILTIN functions (>= 2.2.1, < 2.10)')
346354
assert(box.space._cluster:count() == 1,
347355
'box.space._cluster:count() should be only one')
348356

0 commit comments

Comments
 (0)