commit e1aee3f: Merge pull request #3544 from fatalbanana/tp
GitHub
noreply at github.com
Thu Nov 5 15:14:10 UTC 2020
Author: Vsevolod Stakhov
Date: 2020-11-05 15:09:34 +0000
URL: https://github.com/rspamd/rspamd/commit/e1aee3fcb56ea4dbca57903ae44254ea969cd81f (HEAD -> master)
Merge pull request #3544 from fatalbanana/tp
[Test] Rework composites test
test/functional/cases/109_composites.robot | 50 +++++++++++++++---------------
test/functional/lib/rspamd.robot | 23 ++++++++++++--
2 files changed, 45 insertions(+), 28 deletions(-)
diff --combined test/functional/cases/109_composites.robot
index ef154603a,baab438a3..3aeb009ed
--- a/test/functional/cases/109_composites.robot
+++ b/test/functional/cases/109_composites.robot
@@@ -14,31 -14,31 +14,31 @@@ ${RSPAMD_SCOPE} Suit
*** Test Cases ***
Composites - All in One
Scan File ${MESSAGE}
- Expect Symbol With Score EXPRESSIONS 5
- Expect Symbol With Score EXPRESSIONS_B 0
- Expect Symbol With Score POLICY_REMOVE_WEIGHT 5
- Expect Symbol With Score POLICY_REMOVE_WEIGHT_B 0
- Do Not Expect Symbol POLICY_REMOVE_WEIGHT_A
- Expect Symbol With Score POLICY_FORCE_REMOVE 5.00
- Expect Symbol With Score POLICY_FORCE_REMOVE_A 1.00
- Do Not Expect Symbol POLICY_FORCE_REMOVE_B
- Expect Symbol With Score POLICY_LEAVE 5.00
- Do Not Expect Symbol POLICY_LEAVE_A
- Expect Symbol With Score POLICY_LEAVE_B 1.00
- Expect Symbol With Score DEFAULT_POLICY_REMOVE_WEIGHT 5.00
- Expect Symbol With Score DEFAULT_POLICY_REMOVE_WEIGHT_A 0.00
- Expect Symbol With Score DEFAULT_POLICY_REMOVE_WEIGHT_B 0.00
- Expect Symbol With Score DEFAULT_POLICY_REMOVE_SYMBOL 5.00
- Do Not Expect Symbol DEFAULT_POLICY_REMOVE_SYMBOL_A
- Do Not Expect Symbol DEFAULT_POLICY_REMOVE_SYMBOL_B
- Expect Symbol With Score DEFAULT_POLICY_LEAVE 5.00
- Expect Symbol With Score DEFAULT_POLICY_LEAVE_A 1.00
- Expect Symbol With Score DEFAULT_POLICY_LEAVE_B 1.00
- Expect Symbol With Score SYMBOL_GROUPS 5.00
- Expect Symbol With Score POSITIVE_A -1.00
- Expect Symbol With Score ANY_A -1.00
- Expect Symbol With Score NEGATIVE_B 1.00
- Do Not Expect Symbol NEGATIVE_A
+ Expect Symbols With Scores EXPRESSIONS=5
+ ... EXPRESSIONS_B=0
+ ... POLICY_REMOVE_WEIGHT=5
+ ... POLICY_REMOVE_WEIGHT_B=0
+ ... POLICY_FORCE_REMOVE=5.00
+ ... POLICY_FORCE_REMOVE_A=1.00
+ ... POLICY_LEAVE=5.00
+ ... POLICY_LEAVE_B=1.00
+ ... DEFAULT_POLICY_REMOVE_WEIGHT=5.00
+ ... DEFAULT_POLICY_REMOVE_WEIGHT_A=0.00
+ ... DEFAULT_POLICY_REMOVE_WEIGHT_B=0.00
+ ... DEFAULT_POLICY_REMOVE_SYMBOL=5.00
+ ... DEFAULT_POLICY_LEAVE=5.00
+ ... DEFAULT_POLICY_LEAVE_A=1.00
+ ... DEFAULT_POLICY_LEAVE_B=1.00
+ ... SYMBOL_GROUPS=5.00
+ ... POSITIVE_A=-1.00
+ ... ANY_A=-1.00
+ ... NEGATIVE_B=1.00
+ Do Not Expect Symbols DEFAULT_POLICY_REMOVE_SYMBOL_A
+ ... DEFAULT_POLICY_REMOVE_SYMBOL_B
+ ... NEGATIVE_A
+ ... POLICY_REMOVE_WEIGHT_A
+ ... POLICY_FORCE_REMOVE_B
+ ... POLICY_LEAVE_A
Expect Score 50
Expect Required Score To Be Null
@@@ -51,28 -51,13 +51,28 @@@ Composites - Opts RE Miss on
Scan File ${MESSAGE} opts=sym1,foo1
Expect Symbol With Score SYMOPTS1 5.00
Do Not Expect Symbol SYMOPTS2
+ Do Not Expect Symbol SYMOPTS3
Composites - Opts RE Miss both
Scan File ${MESSAGE} opts=sym2
Do Not Expect Symbol SYMOPTS1
Do Not Expect Symbol SYMOPTS2
+ Do Not Expect Symbol SYMOPTS3
Composites - Opts RE Hit
- Scan File ${MESSAGE} opts=sym2,foo1
+ Scan File ${MESSAGE} opts=foo1,sym2
Expect Symbol With Score SYMOPTS2 6.00
Do Not Expect Symbol SYMOPTS1
+ Do Not Expect Symbol SYMOPTS3
+
+Composites - Opts RE Hit 2
+ Scan File ${MESSAGE} opts=foo/,sym2
+ Expect Symbol With Score SYMOPTS3 6.00
+ Do Not Expect Symbol SYMOPTS2
+ Do Not Expect Symbol SYMOPTS1
+
+Composites - Opts RE Hit 3
+ Scan File ${MESSAGE} opts=example.com->app.link
+ Expect Symbol With Score SYMOPTS4 6.00
+ Do Not Expect Symbol SYMOPTS2
+ Do Not Expect Symbol SYMOPTS1
More information about the Commits
mailing list