diff options
Diffstat (limited to 'test/functional/lua')
-rw-r--r-- | test/functional/lua/deps.lua | 4 | ||||
-rw-r--r-- | test/functional/lua/flags.lua | 2 | ||||
-rw-r--r-- | test/functional/lua/mapreload.lua | 2 | ||||
-rw-r--r-- | test/functional/lua/simple.lua | 2 | ||||
-rw-r--r-- | test/functional/lua/tlds.lua | 4 |
5 files changed, 5 insertions, 9 deletions
diff --git a/test/functional/lua/deps.lua b/test/functional/lua/deps.lua index 581825400..55897091e 100644 --- a/test/functional/lua/deps.lua +++ b/test/functional/lua/deps.lua @@ -1,5 +1,3 @@ -local logger = require "rspamd_logger" - local cb = function(task) task:insert_result('TOP', 1.0) end @@ -29,4 +27,4 @@ rspamd_config:register_dependency('DEP1', 'TOP') for i = 2,10 do rspamd_config:register_symbol('DEP' .. tostring(i), 1.0, cb_gen(i - 1)) rspamd_config:register_dependency('DEP' .. tostring(i), 'DEP' .. tostring(i - 1)) -end
\ No newline at end of file +end diff --git a/test/functional/lua/flags.lua b/test/functional/lua/flags.lua index 61f135f1c..fa99d367f 100644 --- a/test/functional/lua/flags.lua +++ b/test/functional/lua/flags.lua @@ -24,8 +24,6 @@ OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE. ]]-- -local logger = require "rspamd_logger" - rspamd_config:register_post_filter(function(task) task:set_flag('no_stat') task:set_flag('no_log', false) diff --git a/test/functional/lua/mapreload.lua b/test/functional/lua/mapreload.lua index 73c5d0729..aa1de9392 100644 --- a/test/functional/lua/mapreload.lua +++ b/test/functional/lua/mapreload.lua @@ -6,7 +6,7 @@ local test_map = rspamd_config:add_map ({ rspamd_config:register_symbol({ name = 'MAP_SET_HIT_AND_MISS', score = 1.0, - callback = function(task) + callback = function() if (test_map:get_key('example.com') and not test_map:get_key('rspamd.com')) then return true, 'example.com' elseif (test_map:get_key('rspamd.com') and not test_map:get_key('example.com')) then diff --git a/test/functional/lua/simple.lua b/test/functional/lua/simple.lua index 51a1f8b27..22ecde802 100644 --- a/test/functional/lua/simple.lua +++ b/test/functional/lua/simple.lua @@ -1,7 +1,7 @@ rspamd_config:register_symbol({ name = 'SIMPLE_TEST', score = 1.0, - callback = function(task) + callback = function() return true, 'Fires always' end }) diff --git a/test/functional/lua/tlds.lua b/test/functional/lua/tlds.lua index bc655dc9e..efaf01af5 100644 --- a/test/functional/lua/tlds.lua +++ b/test/functional/lua/tlds.lua @@ -1,7 +1,7 @@ rspamd_config:register_symbol({ name = 'TEST_TLD', score = 1.0, - callback = function(task) + callback = function() local prefixes = { '', 'example.' @@ -38,7 +38,7 @@ rspamd_config:register_symbol({ return end local u = rspamd_url.create(pool, p .. d) - local test = u:get_tld() + test = u:get_tld() if (test ~= d) then table.insert(worry, 'url.get_tld:' .. p .. d .. ':' .. test) return |