aboutsummaryrefslogtreecommitdiffstats
path: root/test/functional/cases/learn_siphash.sh
diff options
context:
space:
mode:
Diffstat (limited to 'test/functional/cases/learn_siphash.sh')
-rw-r--r--test/functional/cases/learn_siphash.sh18
1 files changed, 18 insertions, 0 deletions
diff --git a/test/functional/cases/learn_siphash.sh b/test/functional/cases/learn_siphash.sh
new file mode 100644
index 000000000..a91fe9ae9
--- /dev/null
+++ b/test/functional/cases/learn_siphash.sh
@@ -0,0 +1,18 @@
+# Test rspamd learn using siphash
+
+. ${TEST_DIRNAME}/functions.sh
+
+export RSPAMD_CONFIG="$TEST_DIRNAME/configs/stats.conf" \
+ STATSDIR=${TMPDIR} \
+ STATS_HASH="siphash"
+
+run_rspamd
+run_rspamc learn_spam \
+ --key y3ms1knmetxf8gdeixkf74b6tbpxqugmxzqksnjodiqei7tksyty \
+ "$BATS_TEST_DIRNAME/messages/spam_message.eml"
+check_output $output 'success.*true'
+
+run_rspamc symbols \
+ --key y3ms1knmetxf8gdeixkf74b6tbpxqugmxzqksnjodiqei7tksyty \
+ "$BATS_TEST_DIRNAME/messages/spam_message.eml"
+check_output $output 'BAYES_SPAM' \ No newline at end of file