diff options
author | Alexander Moisseev <moiseev@mezonplus.ru> | 2018-10-30 09:51:32 +0300 |
---|---|---|
committer | Alexander Moisseev <moiseev@mezonplus.ru> | 2018-10-30 18:58:19 +0300 |
commit | 046e1b263ac2200a00839a59ebd392169c345bb9 (patch) | |
tree | e5898d11190e92ddffceb67049b6fbd69cd82c57 /test/functional/configs | |
parent | a8b22f9aacad391cdaa865039f38a13f622fdbc3 (diff) | |
download | rspamd-046e1b263ac2200a00839a59ebd392169c345bb9.tar.gz rspamd-046e1b263ac2200a00839a59ebd392169c345bb9.zip |
[Test] Add composites test
Diffstat (limited to 'test/functional/configs')
-rw-r--r-- | test/functional/configs/composites.conf | 64 |
1 files changed, 64 insertions, 0 deletions
diff --git a/test/functional/configs/composites.conf b/test/functional/configs/composites.conf new file mode 100644 index 000000000..3b281fc57 --- /dev/null +++ b/test/functional/configs/composites.conf @@ -0,0 +1,64 @@ +options = { + pidfile = "${TMPDIR}/rspamd.pid" +} +logging = { + type = "file", + level = "debug" + filename = "${TMPDIR}/rspamd.log" +} + +worker { + type = normal + bind_socket = ${LOCAL_ADDR}:${PORT_NORMAL} + count = 1 + task_timeout = 60s; +} +worker { + type = controller + bind_socket = ${LOCAL_ADDR}:${PORT_CONTROLLER} + count = 1 + secure_ip = ["127.0.0.1", "::1"]; + stats_path = "${TMPDIR}/stats.ucl" +} +lua = "${TESTDIR}/lua/test_coverage.lua"; +lua = ${LUA_SCRIPT}; + +composites { + EXPRESSIONS { + expression = "(EXPRESSIONS_A | ~EXPRESSIONS_B) & !EXPRESSIONS_C"; + score = 5.0; + } + + POLICY_REMOVE_WEIGHT { + expression = "POLICY_REMOVE_WEIGHT_A and ~POLICY_REMOVE_WEIGHT_B"; + score = 5.0; + } + POLICY_FORCE_REMOVE { + expression = "POLICY_FORCE_REMOVE_A & ^POLICY_FORCE_REMOVE_B"; + score = 5.0; + } + POLICY_FORCE_REMOVE_LEAVE { + expression = "-POLICY_FORCE_REMOVE_A and -POLICY_FORCE_REMOVE_B"; + score = 5.0; + } + POLICY_LEAVE { + expression = "POLICY_LEAVE_A & -POLICY_LEAVE_B"; + score = 5.0; + } + + DEFAULT_POLICY_REMOVE_WEIGHT { + expression = "DEFAULT_POLICY_REMOVE_WEIGHT_A and DEFAULT_POLICY_REMOVE_WEIGHT_B"; + score = 5.0; + policy = "remove_weight"; + } + DEFAULT_POLICY_REMOVE_SYMBOL { + expression = "DEFAULT_POLICY_REMOVE_SYMBOL_A & DEFAULT_POLICY_REMOVE_SYMBOL_B"; + score = 5.0; + policy = "remove_symbol"; + } + DEFAULT_POLICY_LEAVE { + expression = "DEFAULT_POLICY_LEAVE_A & DEFAULT_POLICY_LEAVE_B"; + score = 5.0; + policy = "leave"; + } +} |