diff options
author | Vsevolod Stakhov <vsevolod@highsecure.ru> | 2020-02-25 18:52:36 +0000 |
---|---|---|
committer | Vsevolod Stakhov <vsevolod@highsecure.ru> | 2020-02-25 18:52:36 +0000 |
commit | 784bd1c3e3a30d6b89b832af2861b0efb11f2245 (patch) | |
tree | f4c9016ae2ab16c878ded605df3dd4a3e8c42422 /test | |
parent | 4184776a1744bfa1e73eac80e8126573d8aae0f0 (diff) | |
download | rspamd-784bd1c3e3a30d6b89b832af2861b0efb11f2245.tar.gz rspamd-784bd1c3e3a30d6b89b832af2861b0efb11f2245.zip |
[Minor] Fix some more tld issues and tld tests
Diffstat (limited to 'test')
-rw-r--r-- | test/functional/lua/tlds.lua | 14 |
1 files changed, 8 insertions, 6 deletions
diff --git a/test/functional/lua/tlds.lua b/test/functional/lua/tlds.lua index efaf01af5..0908001da 100644 --- a/test/functional/lua/tlds.lua +++ b/test/functional/lua/tlds.lua @@ -13,10 +13,10 @@ rspamd_config:register_symbol({ 'example.com', 'example.co.za', 'example.in.net', - 'example.kawasaki.jp', + 'example.star.kawasaki.jp', 'example.net', 'example.net.in', - 'example.nom.br', + 'example.star.nom.br', 'example.org', 'example.org.ac', 'example.ru.com', @@ -34,22 +34,24 @@ rspamd_config:register_symbol({ for _, p in ipairs(prefixes) do local test = rspamd_util.get_tld(p .. d) if (test ~= d) then - table.insert(worry, 'util.get_tld:' .. p .. d .. ':' .. test) + local opt = string.format('util.get_tld:p=%s;d=%s;got=%s', p, d, test) + table.insert(worry, opt) return end local u = rspamd_url.create(pool, p .. d) test = u:get_tld() if (test ~= d) then - table.insert(worry, 'url.get_tld:' .. p .. d .. ':' .. test) + local opt = string.format('url.create:p=%s;d=%s;got=%s', p, d, test) + table.insert(worry, opt) return end end end)() end if (#worry == 0) then - return true, "no worry" + return true, 1.0, "no worry" else - return true, table.concat(worry, ",") + return true, 1.0, worry end end }) |