From 398332ccb20dc9ead073e297cc540512a38c98df Mon Sep 17 00:00:00 2001 From: Vsevolod Stakhov Date: Thu, 28 Jul 2016 16:20:18 +0100 Subject: [Test] Add more tests for multimap module --- test/functional/configs/maps.conf | 15 +++++++++++++++ test/functional/configs/maps/domains.list | 2 ++ test/functional/configs/maps/ip.list | 4 ++++ test/functional/configs/maps/regexp.list | 2 ++ 4 files changed, 23 insertions(+) create mode 100644 test/functional/configs/maps/domains.list create mode 100644 test/functional/configs/maps/ip.list create mode 100644 test/functional/configs/maps/regexp.list (limited to 'test/functional/configs') diff --git a/test/functional/configs/maps.conf b/test/functional/configs/maps.conf index bb3fad0d5..df568c22d 100644 --- a/test/functional/configs/maps.conf +++ b/test/functional/configs/maps.conf @@ -33,4 +33,19 @@ multimap { type = "dnsbl"; map = "rspamd.com"; } + IP_MAP { + type = "ip"; + map = "${TESTDIR}/configs/maps/ip.list"; + } + FROM_MAP { + type = "from"; + filter = "email:domain"; + map = "${TESTDIR}/configs/maps/domains.list"; + } + REGEXP_MAP { + type = "from"; + filter = "email:addr"; + regexp = true; + map = "${TESTDIR}/configs/maps/regexp.list"; + } } diff --git a/test/functional/configs/maps/domains.list b/test/functional/configs/maps/domains.list new file mode 100644 index 000000000..2d8e6387d --- /dev/null +++ b/test/functional/configs/maps/domains.list @@ -0,0 +1,2 @@ +example.com +#other.com \ No newline at end of file diff --git a/test/functional/configs/maps/ip.list b/test/functional/configs/maps/ip.list new file mode 100644 index 000000000..fc3dbf192 --- /dev/null +++ b/test/functional/configs/maps/ip.list @@ -0,0 +1,4 @@ +127.0.0.1 +#127.0.0.2 +10.0.0.0/8 +[::1]/64 \ No newline at end of file diff --git a/test/functional/configs/maps/regexp.list b/test/functional/configs/maps/regexp.list new file mode 100644 index 000000000..0f3ef27bf --- /dev/null +++ b/test/functional/configs/maps/regexp.list @@ -0,0 +1,2 @@ +/^.*@example.com/i +/^user.*@.*com/i -- cgit v1.2.3