diff options
author | Vsevolod Stakhov <vsevolod@highsecure.ru> | 2019-08-14 16:03:42 +0100 |
---|---|---|
committer | Vsevolod Stakhov <vsevolod@highsecure.ru> | 2019-08-14 16:03:42 +0100 |
commit | 20ba7ce125c46cf3a965857b4bb7ad7090950c5a (patch) | |
tree | 52b76db1c5b097800c9a0a3613aae488245a94c4 | |
parent | 104e9476a61286ea9a55e3a975d5049f6a129e60 (diff) | |
download | rspamd-20ba7ce125c46cf3a965857b4bb7ad7090950c5a.tar.gz rspamd-20ba7ce125c46cf3a965857b4bb7ad7090950c5a.zip |
[Test] Added more tests for the settings
-rw-r--r-- | test/functional/cases/108_settings.robot | 7 | ||||
-rw-r--r-- | test/functional/configs/settings.conf | 8 |
2 files changed, 13 insertions, 2 deletions
diff --git a/test/functional/cases/108_settings.robot b/test/functional/cases/108_settings.robot index 63985f883..31d04fa1e 100644 --- a/test/functional/cases/108_settings.robot +++ b/test/functional/cases/108_settings.robot @@ -116,6 +116,7 @@ SETTINGS ID - VIRTUAL SETTINGS ID - VIRTUAL GROUP ${result} = Scan Message With Rspamc ${MESSAGE} --header Settings-Id=id_virtual_group Check Rspamc ${result} SIMPLE_VIRTUAL (10 + Should Contain ${result.stdout} EXPLICIT_VIRTUAL (10 Should Not Contain ${result.stdout} SIMPLE_TEST Should Not Contain ${result.stdout} SIMPLE_VIRTUAL1 Should Not Contain ${result.stdout} SIMPLE_POST @@ -124,6 +125,7 @@ SETTINGS ID - VIRTUAL GROUP SETTINGS ID - VIRTUAL FROM ${result} = Scan Message With Rspamc ${MESSAGE} --from test2@example.com Check Rspamc ${result} SIMPLE_VIRTUAL (10 + Should Contain ${result.stdout} EXPLICIT_VIRTUAL (10 Should Not Contain ${result.stdout} SIMPLE_TEST Should Not Contain ${result.stdout} SIMPLE_VIRTUAL1 Should Not Contain ${result.stdout} SIMPLE_POST @@ -132,6 +134,7 @@ SETTINGS ID - VIRTUAL FROM SETTINGS ID - VIRTUAL USER ${result} = Scan Message With Rspamc ${MESSAGE} --user test@example.com Check Rspamc ${result} SIMPLE_VIRTUAL (10 + Should Contain ${result.stdout} EXPLICIT_VIRTUAL (10 Should Not Contain ${result.stdout} SIMPLE_TEST Should Not Contain ${result.stdout} SIMPLE_VIRTUAL1 Should Not Contain ${result.stdout} SIMPLE_POST @@ -140,6 +143,7 @@ SETTINGS ID - VIRTUAL USER SETTINGS ID - VIRTUAL HOSTNAME ${result} = Scan Message With Rspamc ${MESSAGE} --hostname example.com Check Rspamc ${result} SIMPLE_VIRTUAL (10 + Should Contain ${result.stdout} EXPLICIT_VIRTUAL (10 Should Not Contain ${result.stdout} SIMPLE_TEST Should Not Contain ${result.stdout} SIMPLE_VIRTUAL1 Should Not Contain ${result.stdout} SIMPLE_POST @@ -148,6 +152,7 @@ SETTINGS ID - VIRTUAL HOSTNAME SETTINGS ID - VIRTUAL SELECTOR ${result} = Scan Message With Rspamc ${MESSAGE} --rcpt user3@example.com Check Rspamc ${result} SIMPLE_VIRTUAL (10 + Should Contain ${result.stdout} EXPLICIT_VIRTUAL (10 Should Not Contain ${result.stdout} SIMPLE_TEST Should Not Contain ${result.stdout} SIMPLE_VIRTUAL1 Should Not Contain ${result.stdout} SIMPLE_POST @@ -156,6 +161,7 @@ SETTINGS ID - VIRTUAL SELECTOR SETTINGS ID - ANGLED RECIPIENT ${result} = Scan Message With Rspamc ${MESSAGE} --rcpt <user3@example.com> Check Rspamc ${result} SIMPLE_VIRTUAL (10 + Should Contain ${result.stdout} EXPLICIT_VIRTUAL (10 Should Not Contain ${result.stdout} SIMPLE_TEST Should Not Contain ${result.stdout} SIMPLE_VIRTUAL1 Should Not Contain ${result.stdout} SIMPLE_POST @@ -164,6 +170,7 @@ SETTINGS ID - ANGLED RECIPIENT SETTINGS ID - VIRTUAL HEADER MATCH ${result} = Scan Message With Rspamc ${MESSAGE_7BIT} Check Rspamc ${result} SIMPLE_VIRTUAL (10 + Should Contain ${result.stdout} EXPLICIT_VIRTUAL (10 Should Not Contain ${result.stdout} SIMPLE_TEST Should Not Contain ${result.stdout} SIMPLE_VIRTUAL1 Should Not Contain ${result.stdout} SIMPLE_POST diff --git a/test/functional/configs/settings.conf b/test/functional/configs/settings.conf index 8a68465f4..34b7613b8 100644 --- a/test/functional/configs/settings.conf +++ b/test/functional/configs/settings.conf @@ -36,8 +36,12 @@ settings { expression = 'user || from || hostname || selector:1 || header:mime_version || header:custom_header || header:1 || request_header:test' apply { - groups_enabled = ["vg"]; - SIMPLE_VIRTUAL = 10.0; + symbols_enabled { + SIMPLE_VIRTUAL = 10.0; + } + symbols { + EXPLICIT_VIRTUAL = 10.0 + } } } } |