Tweaks after understanding the existing tests better
This commit is contained in:
parent
5326a7087a
commit
7eb6a38fd8
|
@ -1,4 +0,0 @@
|
||||||
require ["copy", "envelope", "vnd.dovecot.pipe"];
|
|
||||||
if envelope :is "from" "sieve.pipe@test.localdomain" {
|
|
||||||
pipe :copy "pipe_to_tmp";
|
|
||||||
}
|
|
|
@ -0,0 +1,4 @@
|
||||||
|
require ["copy", "vnd.dovecot.pipe"];
|
||||||
|
if header :contains "subject" "Sieve pipe test message" {
|
||||||
|
pipe :copy "pipe_to_tmp";
|
||||||
|
}
|
|
@ -1,12 +1,12 @@
|
||||||
HELO mail.external.tld
|
HELO mail.external.tld
|
||||||
MAIL FROM: user@external.tld
|
MAIL FROM: user@external.tld
|
||||||
RCPT TO: user1@localhost.localdomain
|
RCPT TO: user2@otherdomain.tld
|
||||||
DATA
|
DATA
|
||||||
From: Sieve-pipe-test <sieve.pipe@test.localdomain>
|
From: Sieve-pipe-test <sieve.pipe@external.tld>
|
||||||
To: Existing Local User <alias2@localhost.localdomain>
|
To: Existing Local User <user2@otherdomain.tld>
|
||||||
Date: Sat, 22 May 2010 07:43:25 -0400
|
Date: Sat, 22 May 2010 07:43:25 -0400
|
||||||
Subject: Sieve pipe test message
|
Subject: Sieve pipe test message
|
||||||
This is a test mail to sieve pipe.
|
This is a test mail to sieve pipe.
|
||||||
|
|
||||||
.
|
.
|
||||||
QUIT
|
QUIT
|
|
@ -271,7 +271,7 @@ load 'test_helper/bats-assert/load'
|
||||||
@test "checking smtp: delivers mail to existing account" {
|
@test "checking smtp: delivers mail to existing account" {
|
||||||
run docker exec mail /bin/sh -c "grep 'postfix/lmtp' /var/log/mail/mail.log | grep 'status=sent' | grep ' Saved)' | wc -l"
|
run docker exec mail /bin/sh -c "grep 'postfix/lmtp' /var/log/mail/mail.log | grep 'status=sent' | grep ' Saved)' | wc -l"
|
||||||
assert_success
|
assert_success
|
||||||
assert_output 7
|
assert_output 8
|
||||||
}
|
}
|
||||||
|
|
||||||
@test "checking smtp: delivers mail to existing alias" {
|
@test "checking smtp: delivers mail to existing alias" {
|
||||||
|
@ -771,7 +771,7 @@ load 'test_helper/bats-assert/load'
|
||||||
assert_failure
|
assert_failure
|
||||||
}
|
}
|
||||||
|
|
||||||
@test "checking sieve: user1 should have pipe 1 email to /tmp/" {
|
@test "checking sieve: user2 should have piped 1 email to /tmp/" {
|
||||||
run docker exec mail /bin/sh -c "ls -A /tmp/pipe-test.out | wc -l"
|
run docker exec mail /bin/sh -c "ls -A /tmp/pipe-test.out | wc -l"
|
||||||
assert_success
|
assert_success
|
||||||
assert_output 1
|
assert_output 1
|
||||||
|
|
Loading…
Reference in New Issue