commit fe95fc9: [Fix] Settings: Fix settings check flags
Vsevolod Stakhov
vsevolod at highsecure.ru
Tue Jun 25 09:07:03 UTC 2019
Author: Vsevolod Stakhov
Date: 2019-06-25 09:53:25 +0100
URL: https://github.com/rspamd/rspamd/commit/fe95fc9e1b9914c0a5307cddf8134778197dd4ea
[Fix] Settings: Fix settings check flags
---
src/plugins/lua/settings.lua | 6 +++---
test/functional/cases/108_settings.robot | 2 +-
test/functional/configs/settings.conf | 1 +
3 files changed, 5 insertions(+), 4 deletions(-)
diff --git a/src/plugins/lua/settings.lua b/src/plugins/lua/settings.lua
index 990fa47c3..e3e4b8986 100644
--- a/src/plugins/lua/settings.lua
+++ b/src/plugins/lua/settings.lua
@@ -159,7 +159,7 @@ local function check_query_settings(task)
elt.apply = lua_util.override_defaults(nset, elt.apply)
end
apply_settings(task, elt['apply'], settings_id)
- rspamd_logger.infox(task, "applying settings id %s", settings_id)
+ rspamd_logger.infox(task, "applied settings id %s", settings_id)
return true
end
else
@@ -955,8 +955,8 @@ end
rspamd_config:register_symbol({
name = 'SETTINGS_CHECK',
- type = 'prefilter,nostat',
+ type = 'prefilter',
callback = check_settings,
priority = 10,
- flags = 'empty',
+ flags = 'empty,nostat,explicit_disable,ignore_passthrough',
})
diff --git a/test/functional/cases/108_settings.robot b/test/functional/cases/108_settings.robot
index 071ad88d7..2fc27ea70 100644
--- a/test/functional/cases/108_settings.robot
+++ b/test/functional/cases/108_settings.robot
@@ -107,7 +107,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
+ Check Rspamc ${result} SIMPLE_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 11f7139e5..d46c46b30 100644
--- a/test/functional/configs/settings.conf
+++ b/test/functional/configs/settings.conf
@@ -23,6 +23,7 @@ settings {
id_virtual_group {
apply {
groups_enabled = ["vg"];
+ SIMPLE_VIRTUAL = 10.0;
}
}
}
More information about the Commits
mailing list