From 0a4f412a17a6c76e6ba9bf1a3e6ad7d9f80b6d53 Mon Sep 17 00:00:00 2001 From: Andrew Lewis Date: Sun, 31 Jul 2016 16:03:56 +0200 Subject: [PATCH] [Test] Add test for hostname map --- test/functional/cases/102_maps.robot | 8 ++++++++ test/functional/configs/maps.conf | 4 ++++ 2 files changed, 12 insertions(+) diff --git a/test/functional/cases/102_maps.robot b/test/functional/cases/102_maps.robot index 03291a49f..6070cf5e4 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 0817dd7cf..039ef3fb0 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"; + } } -- 2.39.5