]> source.dussan.org Git - rspamd.git/commitdiff
[Test] Reorder tests
authorVsevolod Stakhov <vsevolod@highsecure.ru>
Thu, 28 Jul 2016 12:57:55 +0000 (13:57 +0100)
committerVsevolod Stakhov <vsevolod@highsecure.ru>
Thu, 28 Jul 2016 12:57:55 +0000 (13:57 +0100)
37 files changed:
src/plugins/lua/multimap.lua
test/functional/cases/100_general.robot [new file with mode: 0644]
test/functional/cases/101_lua.robot [new file with mode: 0644]
test/functional/cases/105_archives.robot [new file with mode: 0644]
test/functional/cases/110_statistics/compat-keyed.robot [new file with mode: 0644]
test/functional/cases/110_statistics/compat-plain.robot [new file with mode: 0644]
test/functional/cases/110_statistics/lib.robot [new file with mode: 0644]
test/functional/cases/110_statistics/redis-keyed-siphash.robot [new file with mode: 0644]
test/functional/cases/110_statistics/redis-keyed-xxhash.robot [new file with mode: 0644]
test/functional/cases/110_statistics/redis-plain-siphash.robot [new file with mode: 0644]
test/functional/cases/110_statistics/redis-plain-xxhash.robot [new file with mode: 0644]
test/functional/cases/110_statistics/sqlite-broken-stats-dir.robot [new file with mode: 0644]
test/functional/cases/110_statistics/sqlite-keyed-siphash.robot [new file with mode: 0644]
test/functional/cases/110_statistics/sqlite-keyed-xxhash.robot [new file with mode: 0644]
test/functional/cases/110_statistics/sqlite-plain-siphash.robot [new file with mode: 0644]
test/functional/cases/110_statistics/sqlite-plain-xxhash.robot [new file with mode: 0644]
test/functional/cases/120_fuzzy/encrypted.robot [new file with mode: 0644]
test/functional/cases/120_fuzzy/lib.robot [new file with mode: 0644]
test/functional/cases/120_fuzzy/plain.robot [new file with mode: 0644]
test/functional/cases/archives.robot [deleted file]
test/functional/cases/fuzzy/encrypted.robot [deleted file]
test/functional/cases/fuzzy/lib.robot [deleted file]
test/functional/cases/fuzzy/plain.robot [deleted file]
test/functional/cases/general.robot [deleted file]
test/functional/cases/lua.robot [deleted file]
test/functional/cases/statistics/compat-keyed.robot [deleted file]
test/functional/cases/statistics/compat-plain.robot [deleted file]
test/functional/cases/statistics/lib.robot [deleted file]
test/functional/cases/statistics/redis-keyed-siphash.robot [deleted file]
test/functional/cases/statistics/redis-keyed-xxhash.robot [deleted file]
test/functional/cases/statistics/redis-plain-siphash.robot [deleted file]
test/functional/cases/statistics/redis-plain-xxhash.robot [deleted file]
test/functional/cases/statistics/sqlite-broken-stats-dir.robot [deleted file]
test/functional/cases/statistics/sqlite-keyed-siphash.robot [deleted file]
test/functional/cases/statistics/sqlite-keyed-xxhash.robot [deleted file]
test/functional/cases/statistics/sqlite-plain-siphash.robot [deleted file]
test/functional/cases/statistics/sqlite-plain-xxhash.robot [deleted file]

index 3851e26c45fea5d13d6258aad11547a13d314c7c..d4fcee6e49cdbbe8c9bfe253de1113f7e16cce83 100644 (file)
@@ -29,7 +29,9 @@ local function ip_to_rbl(ip, rbl)
   return table.concat(ip:inversed_str_octets(), ".") .. '.' .. rbl
 end
 
-local function multimap_callback(task, pre_filter)
+local function multimap_callback(task, rule)
+  local pre_filter = rule['prefilter']
+
   -- Applies specific filter for input
   local function apply_filter(filter, input, rule)
     if filter == 'email:addr' or filter == 'email' then
@@ -345,97 +347,16 @@ local function multimap_callback(task, pre_filter)
     end
   end
 
-  -- IP rules
-  local ip = task:get_from_ip()
-  if ip:is_valid() then
-    each(function(r) match_rule(r, ip) end,
-      filter(function(r)
-        return pre_filter == r['prefilter'] and r['type'] == 'ip'
-      end, rules))
-  end
-
-  -- Header rules
-  each(function(r)
-    local hv = task:get_header_full(r['header'])
-    match_list(r, hv, {'decoded'})
-  end,
-  filter(function(r)
-    return pre_filter == r['prefilter'] and r['type'] == 'header'
-  end, rules))
-
-  -- Rcpt rules
-  if task:has_recipients() then
-    local rcpts = task:get_recipients()
-    each(function(r)
-      match_addr(r, rcpts)
-    end,
-    filter(function(r)
-      return pre_filter == r['prefilter'] and r['type'] == 'rcpt'
-    end, rules))
-  end
-
-  -- From rules
-  if task:has_from() then
-    local from = task:get_from()
-    if from then
-      each(function(r)
-        match_addr(r, from)
-      end,
-      filter(function(r)
-        return pre_filter == r['prefilter'] and r['type'] == 'from'
-      end, rules))
-    end
-  end
-  -- URL rules
-  if task:has_urls() then
-    local urls = task:get_urls()
-    for i,url in ipairs(urls) do
-      each(function(r)
-        match_url(r, url)
-      end,
-      filter(function(r)
-        return pre_filter == r['prefilter'] and r['type'] == 'url'
-      end, rules))
-    end
-  end
-  -- Filename rules
-  local function check_file(fn)
-    each(function(r)
-          match_filename(r, fn)
-        end,
-        filter(function(r)
-          return pre_filter == r['prefilter'] and r['type'] == 'filename'
-        end, rules))
-  end
-  -- Body rules
-  each(function(r)
-    match_content(r)
-  end,
-  filter(function(r)
-    return pre_filter == r['prefilter'] and r['type'] == 'content'
-  end, rules))
-
-  local parts = task:get_parts()
-  for i,p in ipairs(parts) do
-    if p:is_archive() then
-      local fnames = p:get_archive():get_files()
-
-      for ii,fn in ipairs(fnames) do
-        check_file(fn)
-      end
-    end
-
-    local fn = p:get_filename()
-    if fn then
-      check_file(fn)
-    end
-  end
-  -- RBL rules
-  if ip:is_valid() then
-    each(function(r)
+  local rt = rule['type']
+  if rt == 'ip' or rt == 'dnsbl' then
+    local ip = task:get_from_ip()
+    if ip:is_valid() then
+      if rt == 'ip' then
+        match_rule(rule, ip)
+      else
         local cb = function (resolver, to_resolve, results, err, rbl)
           if results then
-            task:insert_result(r['symbol'], 1, r['map'])
+            task:insert_result(rule['symbol'], 1, r['map'])
 
             if pre_filter then
               task:set_pre_result(r['action'], 'Matched map: ' .. r['symbol'])
@@ -444,22 +365,56 @@ local function multimap_callback(task, pre_filter)
         end
 
         task:get_resolver():resolve_a({task = task,
-          name = ip_to_rbl(ip, r['map']),
+          name = ip_to_rbl(ip, rule['map']),
           callback = cb,
-          })
-      end,
-    filter(function(r)
-      return pre_filter == r['prefilter'] and r['type'] == 'dnsbl'
-    end, rules))
-  end
-end
+        })
+      end
+    end
+  elseif rt == 'header' then
+    local hv = task:get_header_full(r['header'])
+    match_list(rule, hv, {'decoded'})
+  elseif rt == 'rcpt' then
+    if task:has_recipients('smtp') then
+      local rcpts = task:get_recipients('smtp')
+      match_addr(rule, rcpts)
+    end
+  elseif rt == 'from' then
+    if task:has_from('smtp') then
+      local from = task:get_from('smtp')
+      match_addr(rule, from)
+    end
+  elseif rt == 'url' then
+    if task:has_urls() then
+      local urls = task:get_urls()
+      for i,url in ipairs(urls) do
+        match_url(rule, url)
+      end
+    end
+  elseif rt == 'filename' then
+    local parts = task:get_parts()
+    for i,p in ipairs(parts) do
+      if p:is_archive() then
+        local fnames = p:get_archive():get_files()
+
+        for ii,fn in ipairs(fnames) do
+          match_filename(rule, fn)
+        end
+      end
 
-local function multimap_filter_callback(task)
-  multimap_callback(task, false)
+      local fn = p:get_filename()
+      if fn then
+        match_filename(rule, fn)
+      end
+    end
+  elseif rt == 'content' then
+    match_content(rule)
+  end
 end
 
-local function multimap_prefilter_callback(task)
-  multimap_callback(task, true)
+local function gen_multimap_callback(rule)
+  return function(task)
+    multimap_callback(task, rule)
+  end
 end
 
 local function add_multimap_rule(key, newrule)
@@ -587,17 +542,11 @@ if opts and type(opts) == 'table' then
   end
   -- add fake symbol to check all maps inside a single callback
   if any(function(r) return not r['prefilter'] end, rules) then
-    local id = rspamd_config:register_symbol({
-      type = 'callback',
-      priority = -1,
-      callback = multimap_filter_callback,
-      flags = 'empty'
-    })
     for i,rule in ipairs(rules) do
       rspamd_config:register_symbol({
-        type = 'virtual',
+        type = 'normal',
         name = rule['symbol'],
-        parent = id,
+        callback = gen_multimap_callback(rule),
       })
     end
   end
@@ -605,8 +554,8 @@ if opts and type(opts) == 'table' then
   if any(function(r) return r['prefilter'] end, rules) then
     rspamd_config:register_symbol({
       type = 'prefilter',
-      name = 'MULTIMAP_PREFILTERS',
-      callback = multimap_prefilter_callback
+      name = rule['symbol'],
+      callback = gen_multimap_callback(rule),
     })
   end
 end
diff --git a/test/functional/cases/100_general.robot b/test/functional/cases/100_general.robot
new file mode 100644 (file)
index 0000000..8876ef9
--- /dev/null
@@ -0,0 +1,42 @@
+*** Settings ***
+Suite Setup     Generic Setup
+Suite Teardown  Generic Teardown
+Library         ${TESTDIR}/lib/rspamd.py
+Resource        ${TESTDIR}/lib/rspamd.robot
+Variables       ${TESTDIR}/lib/vars.py
+
+*** Variables ***
+${CONFIG}       ${TESTDIR}/configs/trivial.conf
+${GTUBE}        ${TESTDIR}/messages/gtube.eml
+${RSPAMD_SCOPE}  Suite
+
+*** Test Cases ***
+GTUBE
+  ${result} =  Scan Message With Rspamc  ${GTUBE}
+  Check Rspamc  ${result}  GTUBE (
+
+GTUBE - Encrypted
+  ${result} =  Run Rspamc  -p  -h  ${LOCAL_ADDR}:${PORT_NORMAL}  --key  ${KEY_PUB1}
+  ...  ${GTUBE}
+  Check Rspamc  ${result}  GTUBE (
+
+GTUBE - Scan File feature
+  ${result} =  Scan File  ${LOCAL_ADDR}  ${PORT_NORMAL}  ${GTUBE}
+  Follow Rspamd Log
+  Should Contain  ${result}  GTUBE
+
+GTUBE - Scan File feature (encoded)
+  ${encoded} =  Encode Filename  ${GTUBE}
+  ${result} =  Scan File  ${LOCAL_ADDR}  ${PORT_NORMAL}  ${encoded}
+  Follow Rspamd Log
+  Should Contain  ${result}  GTUBE
+
+GTUBE - SPAMC
+  ${result} =  Spamc  ${LOCAL_ADDR}  ${PORT_NORMAL}  ${GTUBE}
+  Follow Rspamd Log
+  Should Contain  ${result}  GTUBE
+
+GTUBE - RSPAMC
+  ${result} =  Rspamc  ${LOCAL_ADDR}  ${PORT_NORMAL}  ${GTUBE}
+  Follow Rspamd Log
+  Should Contain  ${result}  GTUBE
diff --git a/test/functional/cases/101_lua.robot b/test/functional/cases/101_lua.robot
new file mode 100644 (file)
index 0000000..5e5dff6
--- /dev/null
@@ -0,0 +1,35 @@
+*** Settings ***
+Test Teardown   Generic Teardown
+Library         ${TESTDIR}/lib/rspamd.py
+Resource        ${TESTDIR}/lib/rspamd.robot
+Variables       ${TESTDIR}/lib/vars.py
+
+*** Variables ***
+${CONFIG}       ${TESTDIR}/configs/lua_test.conf
+${MESSAGE}      ${TESTDIR}/messages/spam_message.eml
+${RSPAMD_SCOPE}  Test
+
+*** Test Cases ***
+Flags
+  [Setup]  Lua Setup  ${TESTDIR}/lua/flags.lua
+  ${result} =  Scan Message With Rspamc  ${MESSAGE}
+  Follow Rspamd Log
+  ${result} =  Run Rspamc  -h  ${LOCAL_ADDR}:${PORT_CONTROLLER}  stat
+  Should Contain  ${result.stdout}  Messages scanned: 0
+
+Dependencies
+  [Setup]  Lua Setup  ${TESTDIR}/lua/deps.lua
+  ${result} =  Scan Message With Rspamc  ${MESSAGE}
+  Check Rspamc  ${result}  DEP10
+
+Pre and Post Filters
+  [Setup]  Lua Setup  ${TESTDIR}/lua/prepostfilters.lua
+  ${result} =  Scan Message With Rspamc  ${MESSAGE}
+  Check Rspamc  ${result}  TEST_PRE
+  Check Rspamc  ${result}  TEST_POST  rc_nocheck=1
+
+*** Keywords ***
+Lua Setup
+  [Arguments]  ${LUA_SCRIPT}
+  Set Test Variable  ${LUA_SCRIPT}
+  Generic Setup
diff --git a/test/functional/cases/105_archives.robot b/test/functional/cases/105_archives.robot
new file mode 100644 (file)
index 0000000..16a14bf
--- /dev/null
@@ -0,0 +1,23 @@
+*** Settings ***
+Suite Setup     Generic Setup
+Suite Teardown  Generic Teardown
+Library         ${TESTDIR}/lib/rspamd.py
+Resource        ${TESTDIR}/lib/rspamd.robot
+Variables       ${TESTDIR}/lib/vars.py
+
+*** Variables ***
+${CONFIG}       ${TESTDIR}/configs/plugins.conf
+${RSPAMD_SCOPE}  Suite
+
+*** Test Cases ***
+Zip
+  ${result} =  Scan Message With Rspamc  ${TESTDIR}/messages/zip.eml
+  Check Rspamc  ${result}  MIME_BAD_EXTENSION \\(\\d+\\.\\d+\\)\\[exe\\]\\n  re=1
+
+Zip Double Bad Extension
+  ${result} =  Scan Message With Rspamc  ${TESTDIR}/messages/zip-doublebad.eml
+  Check Rspamc  ${result}  MIME_DOUBLE_BAD_EXTENSION \\(\\d+\\.\\d+\\)\\[\\.pdf\\.exe\\]\\n  re=1
+
+Rar4
+  ${result} =  Scan Message With Rspamc  ${TESTDIR}/messages/rar4.eml
+  Check Rspamc  ${result}  MIME_BAD_EXTENSION \\(\\d+\\.\\d+\\)\\[exe\\]\\n  re=1
diff --git a/test/functional/cases/110_statistics/compat-keyed.robot b/test/functional/cases/110_statistics/compat-keyed.robot
new file mode 100644 (file)
index 0000000..1242df1
--- /dev/null
@@ -0,0 +1,20 @@
+*** Settings ***
+Suite Setup     Statistics Setup
+Suite Teardown  Statistics Teardown
+Resource        lib.robot
+
+*** Variables ***
+${STATS_BACKEND}  mmap
+${STATS_HASH}   hash = "compat";
+${STATS_KEY}    key = "${KEY_PVT1}";
+${STATS_PATH_CACHE}  name = "sqlite3"; path = "\${TMPDIR}/learn_cache.db";
+
+*** Test Cases ***
+Learn
+  Learn Test
+
+Relearn
+  Relearn Test
+
+Empty Part
+  Empty Part Test
diff --git a/test/functional/cases/110_statistics/compat-plain.robot b/test/functional/cases/110_statistics/compat-plain.robot
new file mode 100644 (file)
index 0000000..12bbaed
--- /dev/null
@@ -0,0 +1,19 @@
+*** Settings ***
+Suite Setup     Statistics Setup
+Suite Teardown  Statistics Teardown
+Resource        lib.robot
+
+*** Variables ***
+${STATS_BACKEND}  mmap
+${STATS_HASH}   hash = "compat";
+${STATS_PATH_CACHE}  name = "sqlite3"; path = "\${TMPDIR}/learn_cache.db";
+
+*** Test Cases ***
+Learn
+  Learn Test
+
+Relearn
+  Relearn Test
+
+Empty Part
+  Empty Part Test
diff --git a/test/functional/cases/110_statistics/lib.robot b/test/functional/cases/110_statistics/lib.robot
new file mode 100644 (file)
index 0000000..5f9e960
--- /dev/null
@@ -0,0 +1,57 @@
+*** Settings ***
+Library         ${TESTDIR}/lib/rspamd.py
+Resource        ${TESTDIR}/lib/rspamd.robot
+Variables       ${TESTDIR}/lib/vars.py
+
+*** Variables ***
+${CONFIG}       ${TESTDIR}/configs/stats.conf
+${MESSAGE}      ${TESTDIR}/messages/spam_message.eml
+${REDIS_SCOPE}  Suite
+${REDIS_SERVER}  ${EMPTY}
+${RSPAMD_SCOPE}  Suite
+${STATS_HASH}   ${EMPTY}
+${STATS_KEY}    ${EMPTY}
+${STATS_PATH_CACHE}  path = "\${TMPDIR}/bayes-cache.sqlite";
+${STATS_PATH_HAM}  path = "\${TMPDIR}/bayes-ham.sqlite";
+${STATS_PATH_SPAM}  path = "\${TMPDIR}/bayes-spam.sqlite";
+
+*** Keywords ***
+Broken Learn Test
+  ${result} =  Run Rspamc  -h  ${LOCAL_ADDR}:${PORT_CONTROLLER}  learn_spam  ${MESSAGE}
+  Check Rspamc  ${result}  cannot find statfile backend
+
+Empty Part Test
+  Set Test Variable  ${MESSAGE}  ${TESTDIR}/messages/empty_part.eml
+  ${result} =  Run Rspamc  -h  ${LOCAL_ADDR}:${PORT_CONTROLLER}  learn_spam  ${MESSAGE}
+  Check Rspamc  ${result}
+  ${result} =  Scan Message With Rspamc  ${MESSAGE}
+  Check Rspamc  ${result}  BAYES_SPAM
+
+Learn Test
+  Set Suite Variable  ${RSPAMD_STATS_LEARNTEST}  0
+  ${result} =  Run Rspamc  -h  ${LOCAL_ADDR}:${PORT_CONTROLLER}  learn_spam  ${MESSAGE}
+  Check Rspamc  ${result}
+  ${result} =  Scan Message With Rspamc  ${MESSAGE}
+  Check Rspamc  ${result}  BAYES_SPAM
+  Set Suite Variable  ${RSPAMD_STATS_LEARNTEST}  1
+
+Relearn Test
+  Run Keyword If  ${RSPAMD_STATS_LEARNTEST} == 0  Fail  "Learn test was not run"
+  ${result} =  Run Rspamc  -h  ${LOCAL_ADDR}:${PORT_CONTROLLER}  learn_ham  ${MESSAGE}
+  Check Rspamc  ${result}
+  ${result} =  Scan Message With Rspamc  ${MESSAGE}
+  Check Rspamc  ${result}  BAYES_HAM
+
+Redis Statistics Setup
+  Generic Setup
+  Run Redis
+
+Redis Statistics Teardown
+  Generic Teardown
+  Shutdown Process With Children  ${REDIS_PID}
+
+Statistics Setup
+  Generic Setup  STATS_PATH_CACHE  STATS_PATH_HAM  STATS_PATH_SPAM
+
+Statistics Teardown
+  Generic Teardown
diff --git a/test/functional/cases/110_statistics/redis-keyed-siphash.robot b/test/functional/cases/110_statistics/redis-keyed-siphash.robot
new file mode 100644 (file)
index 0000000..ec95efc
--- /dev/null
@@ -0,0 +1,20 @@
+*** Settings ***
+Suite Setup     Redis Statistics Setup
+Suite Teardown  Redis Statistics Teardown
+Resource        lib.robot
+
+*** Variables ***
+${REDIS_SERVER}  servers = "${REDIS_ADDR}:${REDIS_PORT}"
+${STATS_BACKEND}  redis
+${STATS_HASH}   hash = "siphash";
+${STATS_KEY}    key = "${KEY_PVT1}";
+
+*** Test Cases ***
+Learn
+  Learn Test
+
+Relearn
+  Relearn Test
+
+Empty Part
+  Empty Part Test
diff --git a/test/functional/cases/110_statistics/redis-keyed-xxhash.robot b/test/functional/cases/110_statistics/redis-keyed-xxhash.robot
new file mode 100644 (file)
index 0000000..5a7b2da
--- /dev/null
@@ -0,0 +1,20 @@
+*** Settings ***
+Suite Setup     Redis Statistics Setup
+Suite Teardown  Redis Statistics Teardown
+Resource        lib.robot
+
+*** Variables ***
+${REDIS_SERVER}  servers = "${REDIS_ADDR}:${REDIS_PORT}"
+${STATS_BACKEND}  redis
+${STATS_HASH}   hash = "xxhash";
+${STATS_KEY}    key = "${KEY_PVT1}";
+
+*** Test Cases ***
+Learn
+  Learn Test
+
+Relearn
+  Relearn Test
+
+Empty Part
+  Empty Part Test
diff --git a/test/functional/cases/110_statistics/redis-plain-siphash.robot b/test/functional/cases/110_statistics/redis-plain-siphash.robot
new file mode 100644 (file)
index 0000000..d436b1a
--- /dev/null
@@ -0,0 +1,19 @@
+*** Settings ***
+Suite Setup     Redis Statistics Setup
+Suite Teardown  Redis Statistics Teardown
+Resource        lib.robot
+
+*** Variables ***
+${REDIS_SERVER}  servers = "${REDIS_ADDR}:${REDIS_PORT}"
+${STATS_BACKEND}  redis
+${STATS_HASH}   hash = "siphash";
+
+*** Test Cases ***
+Learn
+  Learn Test
+
+Relearn
+  Relearn Test
+
+Empty Part
+  Empty Part Test
diff --git a/test/functional/cases/110_statistics/redis-plain-xxhash.robot b/test/functional/cases/110_statistics/redis-plain-xxhash.robot
new file mode 100644 (file)
index 0000000..0c45ac1
--- /dev/null
@@ -0,0 +1,19 @@
+*** Settings ***
+Suite Setup     Redis Statistics Setup
+Suite Teardown  Redis Statistics Teardown
+Resource        lib.robot
+
+*** Variables ***
+${REDIS_SERVER}  servers = "${REDIS_ADDR}:${REDIS_PORT}"
+${STATS_BACKEND}  redis
+${STATS_HASH}   hash = "xxhash";
+
+*** Test Cases ***
+Learn
+  Learn Test
+
+Relearn
+  Relearn Test
+
+Empty Part
+  Empty Part Test
diff --git a/test/functional/cases/110_statistics/sqlite-broken-stats-dir.robot b/test/functional/cases/110_statistics/sqlite-broken-stats-dir.robot
new file mode 100644 (file)
index 0000000..57d75c2
--- /dev/null
@@ -0,0 +1,15 @@
+*** Settings ***
+Suite Setup     Generic Setup
+Suite Teardown  Generic Teardown
+Resource        ${TESTDIR}/lib/rspamd.robot
+Resource        lib.robot
+
+*** Variables ***
+${STATS_BACKEND}  sqlite3
+${STATS_PATH_CACHE}  path = "/does/not/exist/bayes-cache.sqlite";
+${STATS_PATH_HAM}  path = "/does/not/exist/bayes-ham.sqlite";
+${STATS_PATH_SPAM}  path = "/does/not/exist/bayes-spam.sqlite";
+
+*** Test Cases ***
+Broken Stats Directory
+  Broken Learn Test
diff --git a/test/functional/cases/110_statistics/sqlite-keyed-siphash.robot b/test/functional/cases/110_statistics/sqlite-keyed-siphash.robot
new file mode 100644 (file)
index 0000000..8b9661a
--- /dev/null
@@ -0,0 +1,19 @@
+*** Settings ***
+Suite Setup     Statistics Setup
+Suite Teardown  Statistics Teardown
+Resource        lib.robot
+
+*** Variables ***
+${STATS_BACKEND}  sqlite3
+${STATS_HASH}   hash = "siphash";
+${STATS_KEY}    key = "${KEY_PVT1}";
+
+*** Test Cases ***
+Learn
+  Learn Test
+
+Relearn
+  Relearn Test
+
+Empty Part
+  Empty Part Test
diff --git a/test/functional/cases/110_statistics/sqlite-keyed-xxhash.robot b/test/functional/cases/110_statistics/sqlite-keyed-xxhash.robot
new file mode 100644 (file)
index 0000000..7a51e93
--- /dev/null
@@ -0,0 +1,19 @@
+*** Settings ***
+Suite Setup     Statistics Setup
+Suite Teardown  Statistics Teardown
+Resource        lib.robot
+
+*** Variables ***
+${STATS_BACKEND}  sqlite3
+${STATS_HASH}   hash = "xxhash";
+${STATS_KEY}    key = "${KEY_PVT1}";
+
+*** Test Cases ***
+Learn
+  Learn Test
+
+Relearn
+  Relearn Test
+
+Empty Part
+  Empty Part Test
diff --git a/test/functional/cases/110_statistics/sqlite-plain-siphash.robot b/test/functional/cases/110_statistics/sqlite-plain-siphash.robot
new file mode 100644 (file)
index 0000000..2f88e0a
--- /dev/null
@@ -0,0 +1,18 @@
+*** Settings ***
+Suite Setup     Statistics Setup
+Suite Teardown  Statistics Teardown
+Resource        lib.robot
+
+*** Variables ***
+${STATS_BACKEND}  sqlite3
+${STATS_HASH}   hash = "siphash";
+
+*** Test Cases ***
+Learn
+  Learn Test
+
+Relearn
+  Relearn Test
+
+Empty Part
+  Empty Part Test
diff --git a/test/functional/cases/110_statistics/sqlite-plain-xxhash.robot b/test/functional/cases/110_statistics/sqlite-plain-xxhash.robot
new file mode 100644 (file)
index 0000000..dd81982
--- /dev/null
@@ -0,0 +1,18 @@
+*** Settings ***
+Suite Setup     Statistics Setup
+Suite Teardown  Statistics Teardown
+Resource        lib.robot
+
+*** Variables ***
+${STATS_BACKEND}  sqlite3
+${STATS_HASH}   hash = "xxhash";
+
+*** Test Cases ***
+Learn
+  Learn Test
+
+Relearn
+  Relearn Test
+
+Empty Part
+  Empty Part Test
diff --git a/test/functional/cases/120_fuzzy/encrypted.robot b/test/functional/cases/120_fuzzy/encrypted.robot
new file mode 100644 (file)
index 0000000..45408d7
--- /dev/null
@@ -0,0 +1,20 @@
+*** Settings ***
+Suite Setup     Encrypted Fuzzy Setup
+Suite Teardown  Generic Teardown
+Resource        lib.robot
+
+*** Test Cases ***
+Fuzzy Add
+  Fuzzy Add Test
+
+Fuzzy Delete
+  Fuzzy Delete Test
+
+Fuzzy Overwrite
+  Fuzzy Overwrite Test
+
+*** Keywords ***
+Encrypted Fuzzy Setup
+  Set Suite Variable  ${SETTINGS_FUZZY_WORKER}  "keypair": {"pubkey": "${KEY_PUB1}", "privkey": "${KEY_PVT1}"}; "encrypted_only": true;
+  Set Suite Variable  ${SETTINGS_FUZZY_CHECK}  encryption_key = "${KEY_PUB1}";
+  Generic Setup
diff --git a/test/functional/cases/120_fuzzy/lib.robot b/test/functional/cases/120_fuzzy/lib.robot
new file mode 100644 (file)
index 0000000..e5e9cbc
--- /dev/null
@@ -0,0 +1,48 @@
+*** Settings ***
+Library         ${TESTDIR}/lib/rspamd.py
+Resource        ${TESTDIR}/lib/rspamd.robot
+Variables       ${TESTDIR}/lib/vars.py
+
+*** Variables ***
+${CONFIG}       ${TESTDIR}/configs/fuzzy.conf
+${FLAG1_NUMBER}  50
+${FLAG1_SYMBOL}  R_TEST_FUZZY_DENIED
+${FLAG2_NUMBER}  51
+${FLAG2_SYMBOL}  R_TEST_FUZZY_WHITE
+${MESSAGE}      ${TESTDIR}/messages/bad_message.eml
+${RSPAMD_SCOPE}  Suite
+
+*** Keywords ***
+Fuzzy Add Test
+  Set Suite Variable  ${RSPAMD_FUZZY_ADD}  0
+  ${result} =  Run Rspamc  -h  ${LOCAL_ADDR}:${PORT_CONTROLLER}  -w  10  -f
+  ...  ${FLAG1_NUMBER}  fuzzy_add  ${MESSAGE}
+  Check Rspamc  ${result}
+  Sync Fuzzy Storage
+  ${result} =  Scan Message With Rspamc  ${MESSAGE}
+  Check Rspamc  ${result}  ${FLAG1_SYMBOL}
+  Set Suite Variable  ${RSPAMD_FUZZY_ADD}  1
+
+Fuzzy Delete Test
+  Run Keyword If  ${RSPAMD_FUZZY_ADD} == 0  Fail  "Fuzzy Add was not run"
+  ${result} =  Run Rspamc  -h  ${LOCAL_ADDR}:${PORT_CONTROLLER}  -f  ${FLAG1_NUMBER}  fuzzy_del
+  ...  ${MESSAGE}
+  Check Rspamc  ${result}
+  Sync Fuzzy Storage
+  ${result} =  Scan Message With Rspamc  ${MESSAGE}
+  Follow Rspamd Log
+  Should Not Contain  ${result.stdout}  ${FLAG1_SYMBOL}
+  Should Be Equal As Integers  ${result.rc}  0
+
+Fuzzy Overwrite Test
+  ${flag_numbers} =  Create List  ${FLAG1_NUMBER}  ${FLAG2_NUMBER}
+  : FOR  ${i}  IN  @{flag_numbers}
+  \  ${result} =  Run Rspamc  -h  ${LOCAL_ADDR}:${PORT_CONTROLLER}  -w  10
+  \  ...  -f  ${i}  fuzzy_add  ${MESSAGE}
+  \  Check Rspamc  ${result}
+  Sync Fuzzy Storage
+  ${result} =  Scan Message With Rspamc  ${MESSAGE}
+  Follow Rspamd Log
+  Should Not Contain  ${result.stdout}  ${FLAG1_SYMBOL}
+  Should Contain  ${result.stdout}  ${FLAG2_SYMBOL}
+  Should Be Equal As Integers  ${result.rc}  0
diff --git a/test/functional/cases/120_fuzzy/plain.robot b/test/functional/cases/120_fuzzy/plain.robot
new file mode 100644 (file)
index 0000000..2fc2fd5
--- /dev/null
@@ -0,0 +1,18 @@
+*** Settings ***
+Suite Setup     Generic Setup
+Suite Teardown  Generic Teardown
+Resource        lib.robot
+
+*** Variables ***
+${SETTINGS_FUZZY_WORKER}  ${EMPTY}
+${SETTINGS_FUZZY_CHECK}  ${EMPTY}
+
+*** Test Cases ***
+Fuzzy Add
+  Fuzzy Add Test
+
+Fuzzy Delete
+  Fuzzy Delete Test
+
+Fuzzy Overwrite
+  Fuzzy Overwrite Test
diff --git a/test/functional/cases/archives.robot b/test/functional/cases/archives.robot
deleted file mode 100644 (file)
index 16a14bf..0000000
+++ /dev/null
@@ -1,23 +0,0 @@
-*** Settings ***
-Suite Setup     Generic Setup
-Suite Teardown  Generic Teardown
-Library         ${TESTDIR}/lib/rspamd.py
-Resource        ${TESTDIR}/lib/rspamd.robot
-Variables       ${TESTDIR}/lib/vars.py
-
-*** Variables ***
-${CONFIG}       ${TESTDIR}/configs/plugins.conf
-${RSPAMD_SCOPE}  Suite
-
-*** Test Cases ***
-Zip
-  ${result} =  Scan Message With Rspamc  ${TESTDIR}/messages/zip.eml
-  Check Rspamc  ${result}  MIME_BAD_EXTENSION \\(\\d+\\.\\d+\\)\\[exe\\]\\n  re=1
-
-Zip Double Bad Extension
-  ${result} =  Scan Message With Rspamc  ${TESTDIR}/messages/zip-doublebad.eml
-  Check Rspamc  ${result}  MIME_DOUBLE_BAD_EXTENSION \\(\\d+\\.\\d+\\)\\[\\.pdf\\.exe\\]\\n  re=1
-
-Rar4
-  ${result} =  Scan Message With Rspamc  ${TESTDIR}/messages/rar4.eml
-  Check Rspamc  ${result}  MIME_BAD_EXTENSION \\(\\d+\\.\\d+\\)\\[exe\\]\\n  re=1
diff --git a/test/functional/cases/fuzzy/encrypted.robot b/test/functional/cases/fuzzy/encrypted.robot
deleted file mode 100644 (file)
index 45408d7..0000000
+++ /dev/null
@@ -1,20 +0,0 @@
-*** Settings ***
-Suite Setup     Encrypted Fuzzy Setup
-Suite Teardown  Generic Teardown
-Resource        lib.robot
-
-*** Test Cases ***
-Fuzzy Add
-  Fuzzy Add Test
-
-Fuzzy Delete
-  Fuzzy Delete Test
-
-Fuzzy Overwrite
-  Fuzzy Overwrite Test
-
-*** Keywords ***
-Encrypted Fuzzy Setup
-  Set Suite Variable  ${SETTINGS_FUZZY_WORKER}  "keypair": {"pubkey": "${KEY_PUB1}", "privkey": "${KEY_PVT1}"}; "encrypted_only": true;
-  Set Suite Variable  ${SETTINGS_FUZZY_CHECK}  encryption_key = "${KEY_PUB1}";
-  Generic Setup
diff --git a/test/functional/cases/fuzzy/lib.robot b/test/functional/cases/fuzzy/lib.robot
deleted file mode 100644 (file)
index e5e9cbc..0000000
+++ /dev/null
@@ -1,48 +0,0 @@
-*** Settings ***
-Library         ${TESTDIR}/lib/rspamd.py
-Resource        ${TESTDIR}/lib/rspamd.robot
-Variables       ${TESTDIR}/lib/vars.py
-
-*** Variables ***
-${CONFIG}       ${TESTDIR}/configs/fuzzy.conf
-${FLAG1_NUMBER}  50
-${FLAG1_SYMBOL}  R_TEST_FUZZY_DENIED
-${FLAG2_NUMBER}  51
-${FLAG2_SYMBOL}  R_TEST_FUZZY_WHITE
-${MESSAGE}      ${TESTDIR}/messages/bad_message.eml
-${RSPAMD_SCOPE}  Suite
-
-*** Keywords ***
-Fuzzy Add Test
-  Set Suite Variable  ${RSPAMD_FUZZY_ADD}  0
-  ${result} =  Run Rspamc  -h  ${LOCAL_ADDR}:${PORT_CONTROLLER}  -w  10  -f
-  ...  ${FLAG1_NUMBER}  fuzzy_add  ${MESSAGE}
-  Check Rspamc  ${result}
-  Sync Fuzzy Storage
-  ${result} =  Scan Message With Rspamc  ${MESSAGE}
-  Check Rspamc  ${result}  ${FLAG1_SYMBOL}
-  Set Suite Variable  ${RSPAMD_FUZZY_ADD}  1
-
-Fuzzy Delete Test
-  Run Keyword If  ${RSPAMD_FUZZY_ADD} == 0  Fail  "Fuzzy Add was not run"
-  ${result} =  Run Rspamc  -h  ${LOCAL_ADDR}:${PORT_CONTROLLER}  -f  ${FLAG1_NUMBER}  fuzzy_del
-  ...  ${MESSAGE}
-  Check Rspamc  ${result}
-  Sync Fuzzy Storage
-  ${result} =  Scan Message With Rspamc  ${MESSAGE}
-  Follow Rspamd Log
-  Should Not Contain  ${result.stdout}  ${FLAG1_SYMBOL}
-  Should Be Equal As Integers  ${result.rc}  0
-
-Fuzzy Overwrite Test
-  ${flag_numbers} =  Create List  ${FLAG1_NUMBER}  ${FLAG2_NUMBER}
-  : FOR  ${i}  IN  @{flag_numbers}
-  \  ${result} =  Run Rspamc  -h  ${LOCAL_ADDR}:${PORT_CONTROLLER}  -w  10
-  \  ...  -f  ${i}  fuzzy_add  ${MESSAGE}
-  \  Check Rspamc  ${result}
-  Sync Fuzzy Storage
-  ${result} =  Scan Message With Rspamc  ${MESSAGE}
-  Follow Rspamd Log
-  Should Not Contain  ${result.stdout}  ${FLAG1_SYMBOL}
-  Should Contain  ${result.stdout}  ${FLAG2_SYMBOL}
-  Should Be Equal As Integers  ${result.rc}  0
diff --git a/test/functional/cases/fuzzy/plain.robot b/test/functional/cases/fuzzy/plain.robot
deleted file mode 100644 (file)
index 2fc2fd5..0000000
+++ /dev/null
@@ -1,18 +0,0 @@
-*** Settings ***
-Suite Setup     Generic Setup
-Suite Teardown  Generic Teardown
-Resource        lib.robot
-
-*** Variables ***
-${SETTINGS_FUZZY_WORKER}  ${EMPTY}
-${SETTINGS_FUZZY_CHECK}  ${EMPTY}
-
-*** Test Cases ***
-Fuzzy Add
-  Fuzzy Add Test
-
-Fuzzy Delete
-  Fuzzy Delete Test
-
-Fuzzy Overwrite
-  Fuzzy Overwrite Test
diff --git a/test/functional/cases/general.robot b/test/functional/cases/general.robot
deleted file mode 100644 (file)
index 8876ef9..0000000
+++ /dev/null
@@ -1,42 +0,0 @@
-*** Settings ***
-Suite Setup     Generic Setup
-Suite Teardown  Generic Teardown
-Library         ${TESTDIR}/lib/rspamd.py
-Resource        ${TESTDIR}/lib/rspamd.robot
-Variables       ${TESTDIR}/lib/vars.py
-
-*** Variables ***
-${CONFIG}       ${TESTDIR}/configs/trivial.conf
-${GTUBE}        ${TESTDIR}/messages/gtube.eml
-${RSPAMD_SCOPE}  Suite
-
-*** Test Cases ***
-GTUBE
-  ${result} =  Scan Message With Rspamc  ${GTUBE}
-  Check Rspamc  ${result}  GTUBE (
-
-GTUBE - Encrypted
-  ${result} =  Run Rspamc  -p  -h  ${LOCAL_ADDR}:${PORT_NORMAL}  --key  ${KEY_PUB1}
-  ...  ${GTUBE}
-  Check Rspamc  ${result}  GTUBE (
-
-GTUBE - Scan File feature
-  ${result} =  Scan File  ${LOCAL_ADDR}  ${PORT_NORMAL}  ${GTUBE}
-  Follow Rspamd Log
-  Should Contain  ${result}  GTUBE
-
-GTUBE - Scan File feature (encoded)
-  ${encoded} =  Encode Filename  ${GTUBE}
-  ${result} =  Scan File  ${LOCAL_ADDR}  ${PORT_NORMAL}  ${encoded}
-  Follow Rspamd Log
-  Should Contain  ${result}  GTUBE
-
-GTUBE - SPAMC
-  ${result} =  Spamc  ${LOCAL_ADDR}  ${PORT_NORMAL}  ${GTUBE}
-  Follow Rspamd Log
-  Should Contain  ${result}  GTUBE
-
-GTUBE - RSPAMC
-  ${result} =  Rspamc  ${LOCAL_ADDR}  ${PORT_NORMAL}  ${GTUBE}
-  Follow Rspamd Log
-  Should Contain  ${result}  GTUBE
diff --git a/test/functional/cases/lua.robot b/test/functional/cases/lua.robot
deleted file mode 100644 (file)
index 5e5dff6..0000000
+++ /dev/null
@@ -1,35 +0,0 @@
-*** Settings ***
-Test Teardown   Generic Teardown
-Library         ${TESTDIR}/lib/rspamd.py
-Resource        ${TESTDIR}/lib/rspamd.robot
-Variables       ${TESTDIR}/lib/vars.py
-
-*** Variables ***
-${CONFIG}       ${TESTDIR}/configs/lua_test.conf
-${MESSAGE}      ${TESTDIR}/messages/spam_message.eml
-${RSPAMD_SCOPE}  Test
-
-*** Test Cases ***
-Flags
-  [Setup]  Lua Setup  ${TESTDIR}/lua/flags.lua
-  ${result} =  Scan Message With Rspamc  ${MESSAGE}
-  Follow Rspamd Log
-  ${result} =  Run Rspamc  -h  ${LOCAL_ADDR}:${PORT_CONTROLLER}  stat
-  Should Contain  ${result.stdout}  Messages scanned: 0
-
-Dependencies
-  [Setup]  Lua Setup  ${TESTDIR}/lua/deps.lua
-  ${result} =  Scan Message With Rspamc  ${MESSAGE}
-  Check Rspamc  ${result}  DEP10
-
-Pre and Post Filters
-  [Setup]  Lua Setup  ${TESTDIR}/lua/prepostfilters.lua
-  ${result} =  Scan Message With Rspamc  ${MESSAGE}
-  Check Rspamc  ${result}  TEST_PRE
-  Check Rspamc  ${result}  TEST_POST  rc_nocheck=1
-
-*** Keywords ***
-Lua Setup
-  [Arguments]  ${LUA_SCRIPT}
-  Set Test Variable  ${LUA_SCRIPT}
-  Generic Setup
diff --git a/test/functional/cases/statistics/compat-keyed.robot b/test/functional/cases/statistics/compat-keyed.robot
deleted file mode 100644 (file)
index 1242df1..0000000
+++ /dev/null
@@ -1,20 +0,0 @@
-*** Settings ***
-Suite Setup     Statistics Setup
-Suite Teardown  Statistics Teardown
-Resource        lib.robot
-
-*** Variables ***
-${STATS_BACKEND}  mmap
-${STATS_HASH}   hash = "compat";
-${STATS_KEY}    key = "${KEY_PVT1}";
-${STATS_PATH_CACHE}  name = "sqlite3"; path = "\${TMPDIR}/learn_cache.db";
-
-*** Test Cases ***
-Learn
-  Learn Test
-
-Relearn
-  Relearn Test
-
-Empty Part
-  Empty Part Test
diff --git a/test/functional/cases/statistics/compat-plain.robot b/test/functional/cases/statistics/compat-plain.robot
deleted file mode 100644 (file)
index 12bbaed..0000000
+++ /dev/null
@@ -1,19 +0,0 @@
-*** Settings ***
-Suite Setup     Statistics Setup
-Suite Teardown  Statistics Teardown
-Resource        lib.robot
-
-*** Variables ***
-${STATS_BACKEND}  mmap
-${STATS_HASH}   hash = "compat";
-${STATS_PATH_CACHE}  name = "sqlite3"; path = "\${TMPDIR}/learn_cache.db";
-
-*** Test Cases ***
-Learn
-  Learn Test
-
-Relearn
-  Relearn Test
-
-Empty Part
-  Empty Part Test
diff --git a/test/functional/cases/statistics/lib.robot b/test/functional/cases/statistics/lib.robot
deleted file mode 100644 (file)
index 5f9e960..0000000
+++ /dev/null
@@ -1,57 +0,0 @@
-*** Settings ***
-Library         ${TESTDIR}/lib/rspamd.py
-Resource        ${TESTDIR}/lib/rspamd.robot
-Variables       ${TESTDIR}/lib/vars.py
-
-*** Variables ***
-${CONFIG}       ${TESTDIR}/configs/stats.conf
-${MESSAGE}      ${TESTDIR}/messages/spam_message.eml
-${REDIS_SCOPE}  Suite
-${REDIS_SERVER}  ${EMPTY}
-${RSPAMD_SCOPE}  Suite
-${STATS_HASH}   ${EMPTY}
-${STATS_KEY}    ${EMPTY}
-${STATS_PATH_CACHE}  path = "\${TMPDIR}/bayes-cache.sqlite";
-${STATS_PATH_HAM}  path = "\${TMPDIR}/bayes-ham.sqlite";
-${STATS_PATH_SPAM}  path = "\${TMPDIR}/bayes-spam.sqlite";
-
-*** Keywords ***
-Broken Learn Test
-  ${result} =  Run Rspamc  -h  ${LOCAL_ADDR}:${PORT_CONTROLLER}  learn_spam  ${MESSAGE}
-  Check Rspamc  ${result}  cannot find statfile backend
-
-Empty Part Test
-  Set Test Variable  ${MESSAGE}  ${TESTDIR}/messages/empty_part.eml
-  ${result} =  Run Rspamc  -h  ${LOCAL_ADDR}:${PORT_CONTROLLER}  learn_spam  ${MESSAGE}
-  Check Rspamc  ${result}
-  ${result} =  Scan Message With Rspamc  ${MESSAGE}
-  Check Rspamc  ${result}  BAYES_SPAM
-
-Learn Test
-  Set Suite Variable  ${RSPAMD_STATS_LEARNTEST}  0
-  ${result} =  Run Rspamc  -h  ${LOCAL_ADDR}:${PORT_CONTROLLER}  learn_spam  ${MESSAGE}
-  Check Rspamc  ${result}
-  ${result} =  Scan Message With Rspamc  ${MESSAGE}
-  Check Rspamc  ${result}  BAYES_SPAM
-  Set Suite Variable  ${RSPAMD_STATS_LEARNTEST}  1
-
-Relearn Test
-  Run Keyword If  ${RSPAMD_STATS_LEARNTEST} == 0  Fail  "Learn test was not run"
-  ${result} =  Run Rspamc  -h  ${LOCAL_ADDR}:${PORT_CONTROLLER}  learn_ham  ${MESSAGE}
-  Check Rspamc  ${result}
-  ${result} =  Scan Message With Rspamc  ${MESSAGE}
-  Check Rspamc  ${result}  BAYES_HAM
-
-Redis Statistics Setup
-  Generic Setup
-  Run Redis
-
-Redis Statistics Teardown
-  Generic Teardown
-  Shutdown Process With Children  ${REDIS_PID}
-
-Statistics Setup
-  Generic Setup  STATS_PATH_CACHE  STATS_PATH_HAM  STATS_PATH_SPAM
-
-Statistics Teardown
-  Generic Teardown
diff --git a/test/functional/cases/statistics/redis-keyed-siphash.robot b/test/functional/cases/statistics/redis-keyed-siphash.robot
deleted file mode 100644 (file)
index ec95efc..0000000
+++ /dev/null
@@ -1,20 +0,0 @@
-*** Settings ***
-Suite Setup     Redis Statistics Setup
-Suite Teardown  Redis Statistics Teardown
-Resource        lib.robot
-
-*** Variables ***
-${REDIS_SERVER}  servers = "${REDIS_ADDR}:${REDIS_PORT}"
-${STATS_BACKEND}  redis
-${STATS_HASH}   hash = "siphash";
-${STATS_KEY}    key = "${KEY_PVT1}";
-
-*** Test Cases ***
-Learn
-  Learn Test
-
-Relearn
-  Relearn Test
-
-Empty Part
-  Empty Part Test
diff --git a/test/functional/cases/statistics/redis-keyed-xxhash.robot b/test/functional/cases/statistics/redis-keyed-xxhash.robot
deleted file mode 100644 (file)
index 5a7b2da..0000000
+++ /dev/null
@@ -1,20 +0,0 @@
-*** Settings ***
-Suite Setup     Redis Statistics Setup
-Suite Teardown  Redis Statistics Teardown
-Resource        lib.robot
-
-*** Variables ***
-${REDIS_SERVER}  servers = "${REDIS_ADDR}:${REDIS_PORT}"
-${STATS_BACKEND}  redis
-${STATS_HASH}   hash = "xxhash";
-${STATS_KEY}    key = "${KEY_PVT1}";
-
-*** Test Cases ***
-Learn
-  Learn Test
-
-Relearn
-  Relearn Test
-
-Empty Part
-  Empty Part Test
diff --git a/test/functional/cases/statistics/redis-plain-siphash.robot b/test/functional/cases/statistics/redis-plain-siphash.robot
deleted file mode 100644 (file)
index d436b1a..0000000
+++ /dev/null
@@ -1,19 +0,0 @@
-*** Settings ***
-Suite Setup     Redis Statistics Setup
-Suite Teardown  Redis Statistics Teardown
-Resource        lib.robot
-
-*** Variables ***
-${REDIS_SERVER}  servers = "${REDIS_ADDR}:${REDIS_PORT}"
-${STATS_BACKEND}  redis
-${STATS_HASH}   hash = "siphash";
-
-*** Test Cases ***
-Learn
-  Learn Test
-
-Relearn
-  Relearn Test
-
-Empty Part
-  Empty Part Test
diff --git a/test/functional/cases/statistics/redis-plain-xxhash.robot b/test/functional/cases/statistics/redis-plain-xxhash.robot
deleted file mode 100644 (file)
index 0c45ac1..0000000
+++ /dev/null
@@ -1,19 +0,0 @@
-*** Settings ***
-Suite Setup     Redis Statistics Setup
-Suite Teardown  Redis Statistics Teardown
-Resource        lib.robot
-
-*** Variables ***
-${REDIS_SERVER}  servers = "${REDIS_ADDR}:${REDIS_PORT}"
-${STATS_BACKEND}  redis
-${STATS_HASH}   hash = "xxhash";
-
-*** Test Cases ***
-Learn
-  Learn Test
-
-Relearn
-  Relearn Test
-
-Empty Part
-  Empty Part Test
diff --git a/test/functional/cases/statistics/sqlite-broken-stats-dir.robot b/test/functional/cases/statistics/sqlite-broken-stats-dir.robot
deleted file mode 100644 (file)
index 57d75c2..0000000
+++ /dev/null
@@ -1,15 +0,0 @@
-*** Settings ***
-Suite Setup     Generic Setup
-Suite Teardown  Generic Teardown
-Resource        ${TESTDIR}/lib/rspamd.robot
-Resource        lib.robot
-
-*** Variables ***
-${STATS_BACKEND}  sqlite3
-${STATS_PATH_CACHE}  path = "/does/not/exist/bayes-cache.sqlite";
-${STATS_PATH_HAM}  path = "/does/not/exist/bayes-ham.sqlite";
-${STATS_PATH_SPAM}  path = "/does/not/exist/bayes-spam.sqlite";
-
-*** Test Cases ***
-Broken Stats Directory
-  Broken Learn Test
diff --git a/test/functional/cases/statistics/sqlite-keyed-siphash.robot b/test/functional/cases/statistics/sqlite-keyed-siphash.robot
deleted file mode 100644 (file)
index 8b9661a..0000000
+++ /dev/null
@@ -1,19 +0,0 @@
-*** Settings ***
-Suite Setup     Statistics Setup
-Suite Teardown  Statistics Teardown
-Resource        lib.robot
-
-*** Variables ***
-${STATS_BACKEND}  sqlite3
-${STATS_HASH}   hash = "siphash";
-${STATS_KEY}    key = "${KEY_PVT1}";
-
-*** Test Cases ***
-Learn
-  Learn Test
-
-Relearn
-  Relearn Test
-
-Empty Part
-  Empty Part Test
diff --git a/test/functional/cases/statistics/sqlite-keyed-xxhash.robot b/test/functional/cases/statistics/sqlite-keyed-xxhash.robot
deleted file mode 100644 (file)
index 7a51e93..0000000
+++ /dev/null
@@ -1,19 +0,0 @@
-*** Settings ***
-Suite Setup     Statistics Setup
-Suite Teardown  Statistics Teardown
-Resource        lib.robot
-
-*** Variables ***
-${STATS_BACKEND}  sqlite3
-${STATS_HASH}   hash = "xxhash";
-${STATS_KEY}    key = "${KEY_PVT1}";
-
-*** Test Cases ***
-Learn
-  Learn Test
-
-Relearn
-  Relearn Test
-
-Empty Part
-  Empty Part Test
diff --git a/test/functional/cases/statistics/sqlite-plain-siphash.robot b/test/functional/cases/statistics/sqlite-plain-siphash.robot
deleted file mode 100644 (file)
index 2f88e0a..0000000
+++ /dev/null
@@ -1,18 +0,0 @@
-*** Settings ***
-Suite Setup     Statistics Setup
-Suite Teardown  Statistics Teardown
-Resource        lib.robot
-
-*** Variables ***
-${STATS_BACKEND}  sqlite3
-${STATS_HASH}   hash = "siphash";
-
-*** Test Cases ***
-Learn
-  Learn Test
-
-Relearn
-  Relearn Test
-
-Empty Part
-  Empty Part Test
diff --git a/test/functional/cases/statistics/sqlite-plain-xxhash.robot b/test/functional/cases/statistics/sqlite-plain-xxhash.robot
deleted file mode 100644 (file)
index dd81982..0000000
+++ /dev/null
@@ -1,18 +0,0 @@
-*** Settings ***
-Suite Setup     Statistics Setup
-Suite Teardown  Statistics Teardown
-Resource        lib.robot
-
-*** Variables ***
-${STATS_BACKEND}  sqlite3
-${STATS_HASH}   hash = "xxhash";
-
-*** Test Cases ***
-Learn
-  Learn Test
-
-Relearn
-  Relearn Test
-
-Empty Part
-  Empty Part Test