aboutsummaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
authorkorgoth1 <vladislav.stakhov@gmail.com>2020-02-05 11:57:50 +0300
committerkorgoth1 <vladislav.stakhov@gmail.com>2020-02-05 11:57:50 +0300
commit7c5dd8a88d84f3a50011045c093264a7985ba4c5 (patch)
tree2e1314d90716530cbbbad048c74f9b51bc4ba8ea
parent0af58ca53d23fbecea9c04d6108b97029859a435 (diff)
downloadrspamd-7c5dd8a88d84f3a50011045c093264a7985ba4c5.tar.gz
rspamd-7c5dd8a88d84f3a50011045c093264a7985ba4c5.zip
[Test] Setting's priority
-rw-r--r--test/functional/cases/108_settings.robot6
-rw-r--r--test/functional/configs/settings.conf15
-rw-r--r--test/functional/messages/priority.eml5
3 files changed, 26 insertions, 0 deletions
diff --git a/test/functional/cases/108_settings.robot b/test/functional/cases/108_settings.robot
index b7c75af03..d9301e2fa 100644
--- a/test/functional/cases/108_settings.robot
+++ b/test/functional/cases/108_settings.robot
@@ -9,6 +9,7 @@ Variables ${TESTDIR}/lib/vars.py
${CONFIG} ${TESTDIR}/configs/plugins.conf
${LUA_SCRIPT} ${TESTDIR}/lua/settings.lua
${MESSAGE} ${TESTDIR}/messages/spam_message.eml
+${MESSAGE_PRIORITY} ${TESTDIR}/messages/priority.eml
${MESSAGE_7BIT} ${TESTDIR}/messages/utf.eml
${MESSAGE_CUSTOM_HDR} ${TESTDIR}/messages/empty-plain-text.eml
${MESSAGE_ABSENT_MIME} ${TESTDIR}/messages/ed25519.eml
@@ -221,6 +222,11 @@ SETTINGS ID - VIRTUAL DEP
Should Not Contain ${result.stdout} SIMPLE_POST
Should Not Contain ${result.stdout} SIMPLE_PRE
+PRIORITY
+ ${result} = Scan Message With Rspamc ${MESSAGE_PRIORITY} --header Settings-Id=id_virtual_group --from user@test.com
+ Should Contain ${result.stdout} PRIORITY_2
+
+
*** Keywords ***
Settings Setup
Copy File ${TESTDIR}/data/bayes.spam.sqlite3 /tmp/bayes.spam.sqlite3
diff --git a/test/functional/configs/settings.conf b/test/functional/configs/settings.conf
index 0ba4de1c6..a5a538e24 100644
--- a/test/functional/configs/settings.conf
+++ b/test/functional/configs/settings.conf
@@ -15,6 +15,7 @@ settings {
}
id_virtual {
+ priority = high;
apply {
symbols_enabled = ["SIMPLE_VIRTUAL"];
}
@@ -53,7 +54,21 @@ settings {
}
}
}
+
+ id_test_priority {
+ priority = high;
+ from = "user@test.com";
+ apply {
+ symbols_enabled {
+ PRIORITY = 10.0;
+ }
+ symbols {
+ PRIORITY_2 = 10.0
+ }
+ }
+ }
}
+
classifier {
backend = "sqlite3";
statfile {
diff --git a/test/functional/messages/priority.eml b/test/functional/messages/priority.eml
new file mode 100644
index 000000000..2a533efb7
--- /dev/null
+++ b/test/functional/messages/priority.eml
@@ -0,0 +1,5 @@
+From: user@test.com
+To: undisclosed-recipients;;
+
+Content-Transfer-Encoding: base64
+asdasdlsadklsad \ No newline at end of file