diff options
author | Jeremy Harris <jgh146exb@wizmail.org> | 2015-04-19 19:13:58 +0100 |
---|---|---|
committer | Jeremy Harris <jgh146exb@wizmail.org> | 2015-04-19 19:13:58 +0100 |
commit | 35deab6a4e72f25219fa7989be018f39f46a2276 (patch) | |
tree | 47daa1e3e46d80d58af6e51be2646ce9010cd75a /test | |
parent | b8fc75b3728d523ae83d02de92e1cfb002d25c9d (diff) |
Testsuite: fix content-scanner interface tests
Diffstat (limited to 'test')
-rwxr-xr-x | test/runtest | 3 | ||||
-rw-r--r-- | test/scripts/4000-scanning/4008 | 9 | ||||
-rw-r--r-- | test/scripts/4000-scanning/4009 | 5 | ||||
-rw-r--r-- | test/stdout/4008 | 5 | ||||
-rw-r--r-- | test/stdout/4009 | 8 |
5 files changed, 23 insertions, 7 deletions
diff --git a/test/runtest b/test/runtest index 4a4427839..84467064e 100755 --- a/test/runtest +++ b/test/runtest @@ -1333,6 +1333,9 @@ $munges = 'loopback' => { 'stdout' => 's/[[](127\.0\.0\.1|::1)]/[IP_LOOPBACK_ADDR]/' }, + 'scanfile_size' => + { 'stdout' => 's/(Content-length:) \d\d\d/$1 ddd/' }, + }; diff --git a/test/scripts/4000-scanning/4008 b/test/scripts/4000-scanning/4008 index c44b93854..703a7c2aa 100644 --- a/test/scripts/4000-scanning/4008 +++ b/test/scripts/4000-scanning/4008 @@ -1,4 +1,9 @@ # content scan interface: rspamd +# +# The spooled file for scanning includes the test-runner's user name +# hence size varies. Munge that. +munge scanfile_size +# server 11333 <CHECK RSPAMC/1.3
<Content-length: @@ -17,9 +22,10 @@ server 11333 < (envelope < id < for +<From: <Content-type: text/plain <Message-Id: -<From: +<Sender: <Date: < <test @@ -36,6 +42,7 @@ ehlo test.ex mail from:<> rcpt to:<userx@test.ex> data +From: MAILER_DAEMON <> Content-type: text/plain test diff --git a/test/scripts/4000-scanning/4009 b/test/scripts/4000-scanning/4009 index 9c72a8222..0fb96ac16 100644 --- a/test/scripts/4000-scanning/4009 +++ b/test/scripts/4000-scanning/4009 @@ -1,5 +1,10 @@ # content scan interface: spamassassin # +# The spooled file for scanning includes the test-runner's user name +# hence size varies. Munge that. +munge scanfile_size +# +# # A good-comms test, returning not-spam. # (we could use a second one that returns is-spam...) server 7833 diff --git a/test/stdout/4008 b/test/stdout/4008 index e41af881d..afff4e4df 100644 --- a/test/stdout/4008 +++ b/test/stdout/4008 @@ -14,7 +14,7 @@ Listening on port 11333 ... Connection request from [127.0.0.1] <CHECK RSPAMC/1.3 -<Content-length: 479 +<Content-length: ddd <Queue-Id: 10HmaX-0005vi-00 <From: <CALLER@myhost.test.ex> <Recipient-Number: 1 @@ -30,9 +30,10 @@ Connection request from [127.0.0.1] < (envelope-from <CALLER@myhost.test.ex>) < id 10HmaX-0005vi-00 < for userx@test.ex; Tue, 2 Mar 1999 09:44:33 +0000 +<From: MAILER_DAEMON <> <Content-type: text/plain <Message-Id: <E10HmaX-0005vi-00@myhost.test.ex> -<From: CALLER_NAME <CALLER@myhost.test.ex> +<Sender: CALLER_NAME <CALLER@myhost.test.ex> <Date: Tue, 2 Mar 1999 09:44:33 +0000 < <test diff --git a/test/stdout/4009 b/test/stdout/4009 index cdc767781..93fec0c60 100644 --- a/test/stdout/4009 +++ b/test/stdout/4009 @@ -48,7 +48,7 @@ Listening on port 7833 ... Connection request from [127.0.0.1] <REPORT SPAMC/1.2 <User: nobody -<Content-length: 479 +<Content-length: ddd < <From MAILER-DAEMON Tue Mar 02 09:44:33 1999 <X-Envelope-From: <CALLER@myhost.test.ex> @@ -92,7 +92,7 @@ Listening on port 7833 ... Connection request from [127.0.0.1] <REPORT SPAMC/1.2 <User: nobody -<Content-length: 479 +<Content-length: ddd < <From MAILER-DAEMON Tue Mar 02 09:44:33 1999 <X-Envelope-From: <CALLER@myhost.test.ex> @@ -137,7 +137,7 @@ Listening on port 7833 ... Connection request from [127.0.0.1] <REPORT SPAMC/1.2 <User: nobody -<Content-length: 479 +<Content-length: ddd < <From MAILER-DAEMON Tue Mar 02 09:44:33 1999 <X-Envelope-From: <CALLER@myhost.test.ex> @@ -181,7 +181,7 @@ Listening on port 7833 ... Connection request from [127.0.0.1] <REPORT SPAMC/1.2 <User: nobody -<Content-length: 479 +<Content-length: ddd < <From MAILER-DAEMON Tue Mar 02 09:44:33 1999 <X-Envelope-From: <CALLER@myhost.test.ex> |