summaryrefslogtreecommitdiffstats
path: root/test/functional/cases
diff options
context:
space:
mode:
authorkorgoth1 <vladislav.stakhov@gmail.com>2020-06-25 22:41:41 +0300
committerkorgoth1 <vladislav.stakhov@gmail.com>2020-06-25 22:41:41 +0300
commit3396fddc22d38730ececc26fbdbab0c1d0445a26 (patch)
treedeefd3bb7dc0f46900776969f5370c4e58113d60 /test/functional/cases
parent8ec939adcb75a1005dd2aeec52b16a5bee054a59 (diff)
parent742c4d84e482590bfd50fb0ef94bef1bdd45eb63 (diff)
downloadrspamd-3396fddc22d38730ececc26fbdbab0c1d0445a26.tar.gz
rspamd-3396fddc22d38730ececc26fbdbab0c1d0445a26.zip
Merge remote-tracking branch 'upstream/master'
Diffstat (limited to 'test/functional/cases')
-rw-r--r--test/functional/cases/100_general.robot7
-rw-r--r--test/functional/cases/101_lua.robot1
-rw-r--r--test/functional/cases/120_fuzzy/lib.robot6
-rw-r--r--test/functional/cases/131_dkim_signing/006_milter.robot1
-rw-r--r--test/functional/cases/140_proxy.robot8
-rw-r--r--test/functional/cases/180_milter.robot1
-rw-r--r--test/functional/cases/220_http.robot5
-rw-r--r--test/functional/cases/230_tcp.robot5
-rw-r--r--test/functional/cases/231_tcp_down.robot5
-rw-r--r--test/functional/cases/330_neural.robot22
-rw-r--r--test/functional/cases/350_magic.robot1
11 files changed, 24 insertions, 38 deletions
diff --git a/test/functional/cases/100_general.robot b/test/functional/cases/100_general.robot
index 0e5a89c15..868c31d66 100644
--- a/test/functional/cases/100_general.robot
+++ b/test/functional/cases/100_general.robot
@@ -23,23 +23,19 @@ GTUBE - Encrypted
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
# Broken
@@ -51,6 +47,5 @@ GTUBE - RSPAMC
EMAILS DETECTION ZEROFONT
${result} = Scan File ${LOCAL_ADDR} ${PORT_NORMAL} ${TESTDIR}/messages/zerofont.eml
- Follow Rspamd Log
Should Contain ${result} MANY_INVISIBLE_PARTS
- Should Contain ${result} ZERO_FONT \ No newline at end of file
+ Should Contain ${result} ZERO_FONT
diff --git a/test/functional/cases/101_lua.robot b/test/functional/cases/101_lua.robot
index da5f8420b..8abb99b29 100644
--- a/test/functional/cases/101_lua.robot
+++ b/test/functional/cases/101_lua.robot
@@ -17,7 +17,6 @@ ${URL_TLD} ${TESTDIR}/../lua/unit/test_tld.dat
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
diff --git a/test/functional/cases/120_fuzzy/lib.robot b/test/functional/cases/120_fuzzy/lib.robot
index 319e5a900..54eaff0a8 100644
--- a/test/functional/cases/120_fuzzy/lib.robot
+++ b/test/functional/cases/120_fuzzy/lib.robot
@@ -21,7 +21,6 @@ ${SETTINGS_FUZZY_CHECK} ${EMPTY}
*** Keywords ***
Fuzzy Skip Add Test Base
- Create File ${TMPDIR}/skip_hash.map
[Arguments] ${message}
Set Suite Variable ${RSPAMD_FUZZY_ADD_${message}} 0
${result} = Run Rspamc -h ${LOCAL_ADDR}:${PORT_CONTROLLER} -w 10 -f
@@ -31,7 +30,8 @@ Fuzzy Skip Add Test Base
${result} = Scan Message With Rspamc ${message}
Create File ${TMPDIR}/test.map
Should Contain ${result.stdout} R_TEST_FUZZY_DENIED
- Append To File ${TMPDIR}/skip_hash.map 670cfcba72a87bab689958a8af5c22593dc17c907836c7c26a74d1bb49add25adfa45a5f172e3af82c9c638e8eb5fc860c22c7e966e61a459165ef0b9e1acc89
+ Append To File ${TMPDIR}/skip_hash.map.tmp 670cfcba72a87bab689958a8af5c22593dc17c907836c7c26a74d1bb49add25adfa45a5f172e3af82c9c638e8eb5fc860c22c7e966e61a459165ef0b9e1acc89
+ Hard Link ${TMPDIR}/skip_hash.map.tmp ${TMPDIR}/skip_hash.map
${result} = Scan Message With Rspamc ${message}
Check Rspamc ${result} R_TEST_FUZZY_DENIED inverse=1
@@ -54,7 +54,6 @@ Fuzzy Delete Test
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
@@ -83,7 +82,6 @@ Fuzzy Overwrite Test
END
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/131_dkim_signing/006_milter.robot b/test/functional/cases/131_dkim_signing/006_milter.robot
index fa6f532b4..cd48a62b7 100644
--- a/test/functional/cases/131_dkim_signing/006_milter.robot
+++ b/test/functional/cases/131_dkim_signing/006_milter.robot
@@ -25,7 +25,6 @@ Milter Test
[Arguments] ${mtlua}
${result} = Run Process miltertest -Dport\=${PORT_PROXY} -Dhost\=${LOCAL_ADDR} -s ${TESTDIR}/lua/miltertest/${mtlua}
... cwd=${TESTDIR}/lua/miltertest
- Follow Rspamd Log
Should Match Regexp ${result.stderr} ^$
Log ${result.rc}
Log ${result.stdout}
diff --git a/test/functional/cases/140_proxy.robot b/test/functional/cases/140_proxy.robot
index 58b80461a..fabc5a4fd 100644
--- a/test/functional/cases/140_proxy.robot
+++ b/test/functional/cases/140_proxy.robot
@@ -13,32 +13,24 @@ ${URL_TLD} ${TESTDIR}/../lua/unit/test_tld.dat
*** Test Cases ***
Rspamc Client
${result} = Run Rspamc -h ${LOCAL_ADDR}:${PORT_PROXY} -p ${MESSAGE}
- Custom Follow Rspamd Log ${PROXY_TMPDIR}/rspamd.log ${PROXY_LOGPOS} PROXY_LOGPOS Suite
- Custom Follow Rspamd Log ${SLAVE_TMPDIR}/rspamd.log ${SLAVE_LOGPOS} SLAVE_LOGPOS Suite
Run Keyword If ${result.rc} != 0 Log ${result.stderr}
Should Contain ${result.stdout} SIMPLE_TEST
Should Be Equal As Integers ${result.rc} 0
SPAMC
${result} = Spamc ${LOCAL_ADDR} ${PORT_PROXY} ${MESSAGE}
- Custom Follow Rspamd Log ${PROXY_TMPDIR}/rspamd.log ${PROXY_LOGPOS} PROXY_LOGPOS Suite
- Custom Follow Rspamd Log ${SLAVE_TMPDIR}/rspamd.log ${SLAVE_LOGPOS} SLAVE_LOGPOS Suite
Should Contain ${result} SPAMD/1.1 0 EX_OK
RSPAMC Legacy Protocol
${result} = Rspamc ${LOCAL_ADDR} ${PORT_PROXY} ${MESSAGE}
- Custom Follow Rspamd Log ${PROXY_TMPDIR}/rspamd.log ${PROXY_LOGPOS} PROXY_LOGPOS Suite
- Custom Follow Rspamd Log ${SLAVE_TMPDIR}/rspamd.log ${SLAVE_LOGPOS} SLAVE_LOGPOS Suite
Should Contain ${result} RSPAMD/1.3 0 EX_OK
*** Keywords ***
Proxy Setup
&{d} = Run Rspamd CONFIG=${TESTDIR}/configs/lua_test.conf
- Set Suite Variable ${SLAVE_LOGPOS} ${d}[RSPAMD_LOGPOS]
Set Suite Variable ${SLAVE_PID} ${d}[RSPAMD_PID]
Set Suite Variable ${SLAVE_TMPDIR} ${d}[TMPDIR]
&{d} = Run Rspamd CONFIG=${TESTDIR}/configs/proxy.conf
- Set Suite Variable ${PROXY_LOGPOS} ${d}[RSPAMD_LOGPOS]
Set Suite Variable ${PROXY_PID} ${d}[RSPAMD_PID]
Set Suite Variable ${PROXY_TMPDIR} ${d}[TMPDIR]
diff --git a/test/functional/cases/180_milter.robot b/test/functional/cases/180_milter.robot
index 23a366814..ddbbf9799 100644
--- a/test/functional/cases/180_milter.robot
+++ b/test/functional/cases/180_milter.robot
@@ -34,7 +34,6 @@ Milter Test
[Arguments] ${mtlua}
${result} = Run Process miltertest -Dport\=${PORT_PROXY} -Dhost\=${LOCAL_ADDR} -s ${TESTDIR}/lua/miltertest/${mtlua}
... cwd=${TESTDIR}/lua/miltertest
- Follow Rspamd Log
Should Match Regexp ${result.stderr} ^$
Log ${result.rc}
Log ${result.stdout}
diff --git a/test/functional/cases/220_http.robot b/test/functional/cases/220_http.robot
index c30fbba9c..86e882d5d 100644
--- a/test/functional/cases/220_http.robot
+++ b/test/functional/cases/220_http.robot
@@ -68,5 +68,6 @@ Run Dummy Https
Check url
[Arguments] ${url} ${method} @{expect_results}
${result} = Scan Message With Rspamc --header=url:${url} --header=method:${method} ${MESSAGE}
- : FOR ${expect} IN @{expect_results}
- \ Check Rspamc ${result} ${expect} \ No newline at end of file
+ FOR ${expect} IN @{expect_results}
+ Check Rspamc ${result} ${expect}
+ END
diff --git a/test/functional/cases/230_tcp.robot b/test/functional/cases/230_tcp.robot
index 51f590ea4..16d490826 100644
--- a/test/functional/cases/230_tcp.robot
+++ b/test/functional/cases/230_tcp.robot
@@ -75,5 +75,6 @@ Run Dummy Ssl
Check url
[Arguments] ${url} ${method} @{expect_results}
${result} = Scan Message With Rspamc --header=url:${url} --header=method:${method} ${MESSAGE}
- : FOR ${expect} IN @{expect_results}
- \ Check Rspamc ${result} ${expect}
+ FOR ${expect} IN @{expect_results}
+ Check Rspamc ${result} ${expect}
+ END
diff --git a/test/functional/cases/231_tcp_down.robot b/test/functional/cases/231_tcp_down.robot
index 10043024f..e68e2053a 100644
--- a/test/functional/cases/231_tcp_down.robot
+++ b/test/functional/cases/231_tcp_down.robot
@@ -37,5 +37,6 @@ Http Teardown
Check url
[Arguments] ${url} ${method} @{expect_results}
${result} = Scan Message With Rspamc --header=url:${url} --header=method:${method} ${MESSAGE}
- : FOR ${expect} IN @{expect_results}
- \ Check Rspamc ${result} ${expect}
+ FOR ${expect} IN @{expect_results}
+ Check Rspamc ${result} ${expect}
+ END
diff --git a/test/functional/cases/330_neural.robot b/test/functional/cases/330_neural.robot
index c64e9cc0a..89ba19f11 100644
--- a/test/functional/cases/330_neural.robot
+++ b/test/functional/cases/330_neural.robot
@@ -16,11 +16,12 @@ ${RSPAMD_SCOPE} Suite
*** Test Cases ***
Train
Sleep 2s Wait for redis mess
- : FOR ${INDEX} IN RANGE 0 10
- \ ${result} = Scan Message With Rspamc ${MESSAGE} --header Settings={symbols_enabled = ["SPAM_SYMBOL"]}
- \ Check Rspamc ${result} SPAM_SYMBOL (1.00)
- \ ${result} = Scan Message With Rspamc ${MESSAGE} --header Settings={symbols_enabled = ["HAM_SYMBOL"]}
- \ Check Rspamc ${result} HAM_SYMBOL (-1.00)
+ FOR ${INDEX} IN RANGE 0 10
+ ${result} = Scan Message With Rspamc ${MESSAGE} --header Settings={symbols_enabled = ["SPAM_SYMBOL"]}
+ Check Rspamc ${result} SPAM_SYMBOL (1.00)
+ ${result} = Scan Message With Rspamc ${MESSAGE} --header Settings={symbols_enabled = ["HAM_SYMBOL"]}
+ Check Rspamc ${result} HAM_SYMBOL (-1.00)
+ END
Check Neural HAM
Sleep 2s Wait for neural to be loaded
@@ -35,11 +36,12 @@ Check Neural SPAM
Train INVERSE
- : FOR ${INDEX} IN RANGE 0 10
- \ ${result} = Scan Message With Rspamc ${MESSAGE} --header Settings={symbols_enabled = ["SPAM_SYMBOL"]; SPAM_SYMBOL = -1}
- \ Check Rspamc ${result} SPAM_SYMBOL (-1.00)
- \ ${result} = Scan Message With Rspamc ${MESSAGE} --header Settings={symbols_enabled = ["HAM_SYMBOL"]; HAM_SYMBOL = 1;}
- \ Check Rspamc ${result} HAM_SYMBOL (1.00)
+ FOR ${INDEX} IN RANGE 0 10
+ ${result} = Scan Message With Rspamc ${MESSAGE} --header Settings={symbols_enabled = ["SPAM_SYMBOL"]; SPAM_SYMBOL = -1}
+ Check Rspamc ${result} SPAM_SYMBOL (-1.00)
+ ${result} = Scan Message With Rspamc ${MESSAGE} --header Settings={symbols_enabled = ["HAM_SYMBOL"]; HAM_SYMBOL = 1;}
+ Check Rspamc ${result} HAM_SYMBOL (1.00)
+ END
Check Neural HAM INVERSE
Sleep 2s Wait for neural to be loaded
diff --git a/test/functional/cases/350_magic.robot b/test/functional/cases/350_magic.robot
index b3a760086..787e4fe3c 100644
--- a/test/functional/cases/350_magic.robot
+++ b/test/functional/cases/350_magic.robot
@@ -14,7 +14,6 @@ ${URL_TLD} ${TESTDIR}/../lua/unit/test_tld.dat
*** Test Cases ***
Magic detections bundle 1
${result} = Scan Message With Rspamc ${TESTDIR}/messages/gargantua.eml
- Follow Rspamd Log
Should Contain ${result.stdout} MAGIC_SYM_ZIP_2
Should Contain ${result.stdout} MAGIC_SYM_RAR_3
Should Contain ${result.stdout} MAGIC_SYM_EXE_4