From: Andrew Lewis Date: Sun, 31 Jul 2016 14:03:56 +0000 (+0200) Subject: [Test] Add test for hostname map X-Git-Tag: 1.3.1~7^2~1 X-Git-Url: http://git.ipfire.org/cgi-bin/gitweb.cgi?a=commitdiff_plain;h=0a4f412a17a6c76e6ba9bf1a3e6ad7d9f80b6d53;p=thirdparty%2Frspamd.git [Test] Add test for hostname map --- diff --git a/test/functional/cases/102_maps.robot b/test/functional/cases/102_maps.robot index 03291a49ff..6070cf5e44 100644 --- a/test/functional/cases/102_maps.robot +++ b/test/functional/cases/102_maps.robot @@ -97,3 +97,11 @@ MAP - UTF MAP - UTF MISS ${result} = Scan Message With Rspamc ${MESSAGE} Check Rspamc ${result} HEADER_MAP inverse=1 rc_noinverse=1 + +MAP - HOSTNAME + ${result} = Scan Message With Rspamc ${MESSAGE} --ip 127.0.0.1 --hostname example.com + Check Rspamc ${result} HOSTNAME_MAP + +MAP - HOSTNAME MISS + ${result} = Scan Message With Rspamc ${MESSAGE} --ip 127.0.0.1 --hostname rspamd.com + Check Rspamc ${result} HOSTNAME_MAP inverse=1 rc_noinverse=1 diff --git a/test/functional/configs/maps.conf b/test/functional/configs/maps.conf index 0817dd7cfc..039ef3fb00 100644 --- a/test/functional/configs/maps.conf +++ b/test/functional/configs/maps.conf @@ -69,4 +69,8 @@ multimap { map = "${TESTDIR}/configs/maps/utf.list"; regexp = true; } + HOSTNAME_MAP { + type = "hostname"; + map = "${TESTDIR}/configs/maps/domains.list"; + } }