Skip to content

Commit 98ae773

Browse files
committed
Fix rspamd tests
1 parent aaa4b82 commit 98ae773

6 files changed

+14
-13
lines changed

Diff for: tests/tests/configuration/RspamdTest.yml

+2-2
Original file line numberDiff line numberDiff line change
@@ -172,7 +172,7 @@
172172
{
173173
"allow_raw_input": true,
174174
"cache_file": "/var/lib/rspamd/symbols.cache",
175-
"check_all_filters": true,
175+
"check_all_filters": false,
176176
"classify_headers": [
177177
"User-Agent",
178178
"X-Mailer",
@@ -190,6 +190,7 @@
190190
},
191191
"dns_max_requests": 64,
192192
"dynamic_conf": "/var/lib/rspamd/rspamd_dynamic",
193+
"enable_mime_utf": false,
193194
"explicit_modules": [
194195
"settings",
195196
"bayes_expiry"
@@ -208,7 +209,6 @@
208209
"max_urls": 10240,
209210
"one_shot": false,
210211
"pidfile": "/var/run/rspamd/rspamd.pid",
211-
"raw_mode": false,
212212
"rrd": "/var/lib/rspamd/rspamd.rrd",
213213
"soft_reject_on_timeout": false,
214214
"stats_file": "/var/lib/rspamd/stats.ucl",

Diff for: tests/tests/incoming/ReceiveMailTest.yml

+1-1
Original file line numberDiff line numberDiff line change
@@ -54,7 +54,7 @@
5454
5555
Subject: Test
5656
...
57-
X-Spamd-Result: default: False [7.60 / 15.00];
57+
X-Spamd-Result: default: False [7.70 / 15.00];
5858
$$ \t $$HFILTER_FROMHOST_NOT_FQDN(3.00)[localhost];
5959
$$ \t $$HFILTER_HELO_5(3.00)[localhost];
6060
...

Diff for: tests/tests/spam-handling/LearnHamByCopyingIntoHamFolderTest.yml

+3-3
Original file line numberDiff line numberDiff line change
@@ -5,9 +5,9 @@
55
- hosts: client
66
tasks:
77
- name: Send a mail from client to an address SUT is responsible for
8-
ansible.builtin.shell: |
9-
echo "Test-Body" | mailx -s "Test" [email protected]
10-
8+
ansible.builtin.shell: >
9+
echo "Test-Body that needs to be a little bit longer to reach the required
10+
number of tokens for bayes classifier." | mailx -s "Test" [email protected]
1111
- name: Copy the mail from the inbox into the Ham folder
1212
ansible.builtin.shell: |
1313
log_file -noappend imap.log

Diff for: tests/tests/spam-handling/LearnHamByFlaggingTest.yml

+2-3
Original file line numberDiff line numberDiff line change
@@ -6,9 +6,8 @@
66
tasks:
77
- name: Send two mails from client to an address SUT is responsible for
88
ansible.builtin.shell: |
9-
echo "Test-Body blub" | mailx -s "Test 1" [email protected]
10-
echo "Different text" | mailx -s "Test 2" [email protected]
11-
9+
echo "Test-Body that needs to be a little bit longer to reach the required number of tokens for bayes classifier." | mailx -s "Test 1" [email protected]
10+
echo "Different text that needs to be a little bit longer to reach the required number of tokens for bayes classifier." | mailx -s "Test 1" [email protected]
1211
- name: Simulate marking the first mail with a green flag (iOS Mail App) and flag the second as NonJunk
1312
ansible.builtin.shell: |
1413
log_file -noappend imap.log

Diff for: tests/tests/spam-handling/LearnSpamByFlaggingTest.yml

+3-2
Original file line numberDiff line numberDiff line change
@@ -5,8 +5,9 @@
55
- hosts: client
66
tasks:
77
- name: Send a mail from client to an address SUT is responsible for
8-
ansible.builtin.shell: |
9-
echo "Test-Body" | mailx -s "Test" [email protected]
8+
ansible.builtin.shell: >
9+
echo "Test-Body that needs to be a little bit longer to reach the required
10+
number of tokens for bayes classifier." | mailx -s "Test" [email protected]
1011
- name: Simulate flagging the mail as Junk as Thunderbird would do
1112
ansible.builtin.shell: |
1213
log_file -noappend imap.log

Diff for: tests/tests/spam-handling/LearnSpamByMovingIntoSpamFolderTest.yml

+3-2
Original file line numberDiff line numberDiff line change
@@ -5,8 +5,9 @@
55
- hosts: client
66
tasks:
77
- name: Send a mail from client to an address SUT is responsible for
8-
ansible.builtin.shell: |
9-
echo "Test-Body" | mailx -s "Test" [email protected]
8+
ansible.builtin.shell: >
9+
echo "Test-Body that needs to be a little bit longer to reach the required
10+
number of tokens for bayes classifier." | mailx -s "Test" [email protected]
1011
- name: Move the mail from the inbox into the Spam folder
1112
ansible.builtin.shell: |
1213
log_file -noappend imap.log

0 commit comments

Comments
 (0)