From 2bc2a18d49765b577d1f35156335010149196273 Mon Sep 17 00:00:00 2001 From: Vsevolod Stakhov Date: Tue, 18 Nov 2025 11:23:10 +0000 Subject: [PATCH] [Fix] Update lua_mime test to use lua_shape API Fix test to use lua_shape's :check() method instead of calling schema as function (tableshape API). Change: - assert_true(schema(ucl_object)) + local ok, err = schema:check(ucl_object) + assert_true(ok, err) lua_shape schemas cannot be called as functions like tableshape. They provide :check() and :transform() methods instead. --- test/lua/unit/lua_mime.message_to_ucl.lua | 3 ++- 1 file changed, 2 insertions(+), 1 deletion(-) diff --git a/test/lua/unit/lua_mime.message_to_ucl.lua b/test/lua/unit/lua_mime.message_to_ucl.lua index e88fb72711..cdad411657 100644 --- a/test/lua/unit/lua_mime.message_to_ucl.lua +++ b/test/lua/unit/lua_mime.message_to_ucl.lua @@ -318,7 +318,8 @@ context("Task piecewise split", function() local expected = parser:get_object() local ucl_object = lua_mime.message_to_ucl(task, true) local schema = lua_mime.message_to_ucl_schema() - assert_true(schema(ucl_object)) + local ok, err = schema:check(ucl_object) + assert_true(ok, err) assert_rspamd_table_eq({ actual = ucl_object, expect = expected -- 2.47.3