From: korgoth1 Date: Wed, 5 Feb 2020 08:57:50 +0000 (+0300) Subject: [Test] Setting's priority X-Git-Tag: 2.4~103^2~1 X-Git-Url: http://git.ipfire.org/cgi-bin/gitweb.cgi?a=commitdiff_plain;h=7c5dd8a88d84f3a50011045c093264a7985ba4c5;p=thirdparty%2Frspamd.git [Test] Setting's priority --- diff --git a/test/functional/cases/108_settings.robot b/test/functional/cases/108_settings.robot index b7c75af03f..d9301e2fa0 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 0ba4de1c6f..a5a538e245 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 0000000000..2a533efb76 --- /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