Add a test of the cleanup.
authorFlorent Bruneau <florent.bruneau@polytechnique.org>
Wed, 1 Oct 2008 18:30:08 +0000 (20:30 +0200)
committerFlorent Bruneau <florent.bruneau@polytechnique.org>
Wed, 1 Oct 2008 18:30:08 +0000 (20:30 +0200)
Signed-off-by: Florent Bruneau <florent.bruneau@polytechnique.org>
postlicyd/data/test.conf
postlicyd/tst-filters.c

index 9901acc..6e0a7a0 100644 (file)
@@ -108,6 +108,7 @@ greylist1 {
   delay  = 1;
   retry_window = 4;
   client_awl = 2;
+  max_age = 8;
 
   on_greylist = postfix:OK;
   on_whitelist = postfix:OK;
index 7bcaa41..1a8db8b 100644 (file)
@@ -175,6 +175,8 @@ static bool run_greylisttest(const config_t *config, const char *basepath)
     TEST("auto_whitelisted", filter_test(greylist1, &q1, HTK_WHITELIST));
     TEST("other_auto_whitelisted", filter_test(greylist1, &q2, HTK_WHITELIST));
     TEST("greylisted", filter_test(greylist1, &q3, HTK_GREYLIST));
+    sleep(10);
+    TEST("cleanup", filter_test(greylist1, &q1, HTK_GREYLIST));
 
     return ok;
 }