]> source.dussan.org Git - rspamd.git/commitdiff
Add reload test case.
authorVsevolod Stakhov <vsevolod@highsecure.ru>
Mon, 20 Jul 2015 11:58:33 +0000 (12:58 +0100)
committerVsevolod Stakhov <vsevolod@highsecure.ru>
Mon, 20 Jul 2015 11:58:52 +0000 (12:58 +0100)
test/functional/cases/reload.sh [new file with mode: 0644]

diff --git a/test/functional/cases/reload.sh b/test/functional/cases/reload.sh
new file mode 100644 (file)
index 0000000..cb1ce0b
--- /dev/null
@@ -0,0 +1,23 @@
+# Test rspamd reload
+
+. ${TEST_DIRNAME}/functions.sh
+
+sed -e 's|@@LUA_SCRIPT@@|${TESTDIR}/cases/deps.lua|' < \
+       "$TEST_DIRNAME/configs/lua_test.conf" > \
+       "$TMPDIR/rspamd.conf"
+export RSPAMD_CONFIG="$TMPDIR/rspamd.conf" \
+       STATSDIR=${TMPDIR}
+run_rspamd
+
+run_rspamc symbols \
+       "$TEST_DIRNAME/messages/spam_message.eml"
+check_output 'DEP10'
+
+kill -HUP `cat ${TMPDIR}/rspamd.pid`
+sleep 0.5
+kill -HUP `cat ${TMPDIR}/rspamd.pid`
+sleep 0.5
+
+run_rspamc symbols \
+       "$TEST_DIRNAME/messages/spam_message.eml"
+check_output 'DEP10'
\ No newline at end of file