Commit Graph

291 Commits

Author SHA1 Message Date
Jared Johnson
a9e7d00177 Tests exclude_connection() and exclude_recipient() 2014-12-11 16:55:59 -06:00
Jared Johnson
4ad56e4117 Add tests for check_genre() 2014-12-11 16:50:06 -06:00
Jared Johnson
ec470ed08e Tests for ident/p0f rcpt_handler() 2014-12-11 16:29:07 -06:00
Jared Johnson
0a7c6f0f08 Tests for ident/p0f register_genre_blocking() 2014-12-11 16:06:54 -06:00
Jared Johnson
0d5ec185a8 Make fake_config() available to all plugin tests 2014-12-11 15:33:34 -06:00
Jared Johnson
4f4e19ba0a Better fake_config() in t/plugin_tests/content_log 2014-12-11 15:31:23 -06:00
Jared Johnson
4547677135 Tests for ident/p0f register_headers() 2014-12-11 15:11:51 -06:00
Jared Johnson
b8e5e0a1b9 Make content log file configurable 2014-12-03 15:50:45 -06:00
Jared Johnson
64c7519d7c content_log_enabled: Accept multiple 'true' values 2014-12-03 09:57:27 -06:00
Jared Johnson
c77a3344d7 Rename enable_content_log to content_log_enabled 2014-12-03 08:57:05 -06:00
Jared Johnson
e95f1e294e Add method to exclude messages from content log 2014-12-02 17:13:00 -06:00
Jared Johnson
edc8f7600d Test content_log enable/disable logic 2014-12-02 17:08:07 -06:00
Jared Johnson
ae887c156b Add some basic testing for content_log 2014-12-02 17:02:45 -06:00
Jared Johnson
1d29db66ff Move some DBM functions to Qpsmptd::DB::File::DBM
Not everything is moved and Qpsmtpd::DB* does not yet have test coverage
2014-11-25 17:52:18 -06:00
Jared Johnson
5fe9d80f9b Clarify DBM-specific functions
This changes function names only
2014-11-24 17:09:42 -06:00
Jared Johnson
30dd9cafeb Add some p0f results to message headers 2014-11-21 16:51:19 -06:00
Matt Simerson
fd11777892 Merge pull request #144 from grtodd/master
Add auth_imap plugin.
2014-11-15 12:08:25 -08:00
Graham Todd
29f12626a0 perltidy -b t/plugin_tests/auth/auth_imap 2014-11-15 08:40:34 -05:00
Jared Johnson
3b2b720ed5 Add tests for header addition 2014-11-13 13:52:49 -06:00
Jared Johnson
cf0d87610c Make GeoIP headers optional 2014-11-13 11:13:15 -06:00
Jared Johnson
3ffee33d33 Remove extraneous semicolons
They confuse my editor
2014-11-11 16:59:40 -06:00
Matt Simerson
84db310736 geoip: don't run ASN tests if ASN db didn't load 2014-11-11 02:02:21 -05:00
Jared Johnson
bd47d60304 Add test files 2014-11-06 17:08:21 -06:00
Jared Johnson
2655e7b452 Add tests for exclude files 2014-11-06 17:02:27 -06:00
Graham Todd
fc50cc2629 Update pull request with suggested changes from feedback. 2014-11-06 15:37:40 -05:00
Matt Simerson
924dbfe5de async_resolver: suppress test warning when
Net::DNS::Async not installed.
2014-11-06 11:15:18 -08:00
Matt Simerson
38d5523b35 Base: consistent DNS handling 2014-11-06 11:15:18 -08:00
Graham Todd
ceb7419578 Add auth_imap plugin. 2014-11-06 13:00:52 -05:00
Matt Simerson
54abd60239 strip off AS prefix 2014-11-05 14:30:23 -08:00
Matt Simerson
f2eda74074 ASN lookups now work 2014-11-05 14:30:22 -08:00
Matt Simerson
c61dbb5734 added GeoIP2 support, partial ASN support 2014-11-05 14:30:22 -08:00
Matt Simerson
9862cdc042 geoip: simplify the get/set data bits 2014-11-05 14:30:22 -08:00
Matt Simerson
1abfd152f2 Merge pull request #137 from msimerson/test-limit
allow testing a single plugin
2014-11-04 14:43:18 -08:00
Matt Simerson
92648b7198 allow testing a single plugin 2014-11-04 12:49:15 -08:00
Jared Johnson
b5d6c2e4c8 Add tests 2014-10-28 14:38:15 -05:00
Matt Simerson
7576e64f70 Address: renamed $domain/$domain_re (clearer)
and added a couple more tests
2014-09-22 10:33:15 -07:00
Matt Simerson
2aaedbb445 address: added tests for canonify 2014-09-21 16:52:30 -07:00
Jared Johnson
7969c632aa Clearer config_dir() tests 2014-09-18 16:52:32 -05:00
Matt Simerson
7a7af4c2bb make it more obvious that ->address is stringified 2014-09-18 11:11:11 -07:00
Matt Simerson
b289d38f53 more cleanups 2014-09-17 22:22:44 -07:00
Matt Simerson
c55fa030f8 Address: remove useless undef
and added tests to validate that they really are useless
2014-09-17 22:22:44 -07:00
Matt Simerson
72f1a7a962 Merge pull request #119 from flimzy/return_cleanups
Remove a ton of 'return ()', and a few other minor readability tweaks.
2014-09-17 22:19:53 -07:00
Jonathan Hall
555c87c52f Silence a noisy test by passing an expected data type. 2014-09-17 21:08:34 -05:00
Jonathan Hall
897a1fd8aa Remove a ton of 'return ()', and a few other minor readability tweaks. 2014-09-17 20:28:51 -05:00
Matt Simerson
519bb12503 simplify config->from_file by not requiring full
file path. Instead, figure it out the same way as the 4 of the 5 caller do (by calling config_dir). Allow the 2nd arg to be the file name.
2014-09-17 13:03:46 -07:00
Matt Simerson
1e5d249224 added tests for run_hooks & run_hooks_no_respond 2014-09-17 13:03:46 -07:00
Matt Simerson
9a38850f13 added test for run_continuation 2014-09-17 13:03:46 -07:00
Matt Simerson
0499317912 Qpsmtpd: style changes in hook_responder 2014-09-17 13:02:44 -07:00
Matt Simerson
9cd8b165a0 qpsmtpd.t: added tests for hook_responder 2014-09-17 13:01:29 -07:00
Matt Simerson
1e82ae1bc7 async removed
1. the known users of async don't upgrade
2. async becomes a win when concurrent connections exceed a few hundred simultaneous
3. anyone that needs async should be looking at Haraka instead
4. the perl async dependencies aren't maintained
2014-09-17 11:38:40 -07:00
Matt Simerson
ed3e550d7f Merge pull request #110 from msimerson/tests
remove test counters from plugin tests
2014-09-17 10:19:13 -07:00
Matt Simerson
a5420149bd remove test counters from plugin tests
replace with done_testing(), which provides the same "make sure to kvetch if tests fail to run" without requiring humans to do the bookkeeping.
2014-09-17 00:11:32 -07:00
Matt Simerson
1ebe5ea6ec put git version detection code into a sub 2014-09-17 00:08:33 -07:00
Matt Simerson
d5481df3dd Q::hooks(), accept a hook name argument
and return a useful result
2014-09-16 21:22:36 -07:00
Matt Simerson
13f445596a Merge pull request #104 from flimzy/clam-opts
Fix clamdscan configuration handling
2014-09-16 12:10:18 -07:00
Jonathan Hall
f2bcd3736a New tests to cover new handling of register-time configuration. 2014-09-16 14:04:37 -05:00
Jonathan Hall
3d97773827 Reverse sense of is_not_multipart to is_multipart. 2014-09-16 13:57:15 -05:00
Jonathan Hall
44cafde7d4 More complete clamdcscan tests
* construct our own Qpsmtpd::Transaction object for testing, so we're sure
   to have a pristine state
 * Move some logic into a should_scan() sub, to help separate scan_all from
   is_not_multipart (since the multipart state of a message has nothing to
   do with any configuration parameters)
2014-09-16 13:48:19 -05:00
Jonathan Hall
8344bf8439 Working toward functional virus/clamdscan tests. 2014-09-16 12:56:32 -05:00
Matt Simerson
a473c2732d updated Config::defaults() to behave as before
and added additional tests for it
2014-09-16 09:52:05 -07:00
Matt Simerson
b153c0ab99 more tests for Qpsmtpd::Config
* fix for cache clearing that didn't work
* imported a sample .cdb file for testing
2014-09-16 00:54:47 -07:00
Matt Simerson
75cb416b62 added diagnostics for failed spool_dir test
likely due to config caching
2014-09-16 00:03:28 -07:00
Matt Simerson
ebdb25a4bd extracted config*() from Qpsmtpd.pm -> Config.pm
* includes full test converage for Qpsmtpd::Config
    * folded t/config.t into t/qpsmtpd-config.t
* includes additional tests for Qpsmtpd
    * folded t/tempstuff into t/qpsmtpd.t
* PBP adjustments here and there
* other tweaks to handle test warnings
2014-09-15 23:41:31 -07:00
Matt Simerson
f8e2fdb966 more tests for Qpsmtpd.pm 2014-09-15 18:54:10 -07:00
Matt Simerson
b60c14a7c1 t/q-base, s/utils/base/ 2014-09-15 18:53:30 -07:00
Matt Simerson
710894cd49 moved Qpsmtpd::Utils -> Base.pm 2014-09-15 18:53:30 -07:00
Matt Simerson
851e1b54ee META updates, tidy, PBP tweaks
* update manifest
* perltidy
* replace postfix if/unless with brackets
* reduce useless indention by exiting sooner
2014-09-15 15:57:12 -07:00
Jared Johnson
f052543154 Correct number of user_config tests 2014-09-15 17:06:47 -05:00
Jared Johnson
de742dc95e Add tests for user_config plugin 2014-09-15 17:06:47 -05:00
Jared Johnson
23ce6002cf Qpsmtpd::config() tests 2014-09-15 17:06:47 -05:00
Jared Johnson
cda40f970b Remove an unintentionally commited subroutine 2014-09-15 17:03:52 -05:00
Jared Johnson
fb8f582055 Use a loop to make test data clearer 2014-09-15 17:03:52 -05:00
Jared Johnson
41a71f5d79 Move test sub definition to the bottom 2014-09-15 17:03:52 -05:00
Jared Johnson
18bfc45d0b Fall back correctly between config methods
hook_user_config no falls back to global hook_config followed by
file-based config followed by %defaults
2014-09-15 17:01:39 -05:00
Jared Johnson
eb482aad0a Tests for Qpsmtpd::Address::config()
Tests for the new Qpsmtpd::Address::config() which should call hook_user_config plugins
2014-09-15 17:01:39 -05:00
Matt Simerson
7396dbbf5f more tests for Qpsmtpd.pm 2014-09-15 11:53:28 -07:00
Matt Simerson
a53c692c7b earlytalker: check connection note for wait length
Issue #58
reputation databases can set $connection->notes(earlytalker_wait)
2014-09-12 13:32:08 -07:00
Matt Simerson
2cc57f6db3 Merge pull request #95 from msimerson/helo
helo: make NXDOMAIN time out faster
2014-09-12 01:06:21 -07:00
Jared Johnson
cc25532593 Replace warning with slightly better testing
Testing LOGWARN was generating a real warning that polluted test output.
Instead, let's catch the warning and test that it actually happens.
2014-09-12 01:23:09 -05:00
Matt Simerson
ca96ddf4eb added Utils->is_valid_ip, IPv6 ready
resolves Issue #82
2014-09-11 13:34:32 -07:00
Matt Simerson
5960cb4d87 helo: make NXDOMAIN time out faster 2014-09-11 11:37:46 -07:00
Jared Johnson
bf2cfcf4e3 Merge pull request #92 from msimerson/master
tests for Qpsmtpd/SMTP
2014-09-11 13:18:03 -05:00
Jared Johnson
f15a38dfe3 Merge pull request #94 from msimerson/rpm-version
add test to assure RPM VERSION is up-to-date (#80)
2014-09-11 13:00:25 -05:00
Matt Simerson
847db53e0d updated fault test in qpsmtpd-smtp.t 2014-09-11 10:53:09 -07:00
Matt Simerson
e7a4ca2b08 update MANIFEST and suppress helo test error 2014-09-11 10:46:29 -07:00
Matt Simerson
fabbdae960 tests for Qpsmtpd/SMTP
* order the ‘use’  pragmas
* compact the new() method
* move fault() tests into t/qpsmtpd-smtp.t
2014-09-11 10:46:29 -07:00
Matt Simerson
bcacb2778c add test to assure RPM VERSION is up-to-date (#80) 2014-09-11 10:37:56 -07:00
Jonathan Hall
8b1ff67604 Update fault()'s output to inidcate the possibly meaninglessness of the reported system error. 2014-09-11 11:58:31 -05:00
Matt Simerson
8f8463e91e Merge pull request #87 from flimzy/misc-tests
Silence misc.t STDOUT by testing for it.
2014-09-11 09:09:48 -07:00
Matt Simerson
04a984bbab helo: improved invalid_localhost detection 2014-09-10 15:12:52 -07:00
Matt Simerson
60877da4ed added Utils::is_localhost and t/qpsmtpd-utils.t
resolves Issue #89
2014-09-10 13:52:56 -07:00
Matt Simerson
39c454c95e helo: added IPv6 support to invalid_localhost
and also suppress a test warning
2014-09-10 13:52:56 -07:00
Jonathan Hall
7b3018c660 Remove reference to 'No such file or directory', as there's no guarantee
this is what $!  will return when this code is called during testing.
2014-09-10 10:15:43 -05:00
Jonathan Hall
11f47cb2ab Silence misc.t STDOUT by testing for it. 2014-09-10 08:55:17 -05:00
Matt Simerson
c9a780576f added tests for lib/Qpsmtpd.pm (Issue #67) 2014-09-08 22:58:27 -07:00
Priyadi Iman Nurcahyo
bef79d3b7d Fix test for munge_subject_threshold 2014-05-15 14:45:33 +00:00
Matt Simerson
a19b7de787 updated DMARC plugin tests
disabled for now, b/c they tested methods which no longer exist in new plugin
2013-12-18 00:09:10 -05:00
Matt Simerson
c652d4c9e4 dmarc test: comments in the public list was
allowing certain org domain searches to fail (plus.google.com, b/c a google.com email address was in the public list). Now I anchor the searches to the start of the line. This test also catches edge cases like co.uk, which isn't listed, but a wildcard *.uk is.
2013-08-05 15:05:37 -07:00
Matt Simerson
9c96ae78e4 find . -name '*.t' -exec perltidy -b {} \; 2013-08-05 15:05:15 -07:00
Matt Simerson
5b06929e95 find . -name '*.pm' -exec perltidy -b {} \; 2013-08-05 15:05:15 -07:00