Refactored.
This commit is contained in:
parent
bec2b0ac1d
commit
80007a7b53
|
@ -0,0 +1,9 @@
|
|||
@test "checking process: process is not running" {
|
||||
run docker exec mail /bin/bash -c "ps aux | grep 'dovecot/pop'"
|
||||
[ "$status" -eq 1 ]
|
||||
}
|
||||
|
||||
@test "checking pop: server does not respond on port 110" {
|
||||
run docker exec mail /bin/bash -c "nc -w 1 0.0.0.0 110"
|
||||
[ "$status" -eq 1 ]
|
||||
}
|
|
@ -0,0 +1,14 @@
|
|||
@test "checking process: process is running" {
|
||||
run docker exec mail /bin/bash -c "ps aux | grep 'dovecot/pop'"
|
||||
[ "$status" -eq 0 ]
|
||||
}
|
||||
|
||||
@test "checking pop: server responds on port 110" {
|
||||
run docker exec mail /bin/bash -c "nc -w 1 0.0.0.0 110 | grep '+OK'"
|
||||
[ "$status" -eq 0 ]
|
||||
}
|
||||
|
||||
@test "checking pop: authentication works" {
|
||||
run docker exec mail /bin/sh -c "nc -w 1 0.0.0.0 110 < /tmp/docker-mailserver-test/auth/pop3-auth.txt"
|
||||
[ "$status" -eq 0 ]
|
||||
}
|
|
@ -0,0 +1,4 @@
|
|||
@test "checking sasl: sasl_passwd.db should not exist" {
|
||||
run docker exec mail [ -f /etc/postfix/sasl_passwd.db ]
|
||||
[ "$status" -eq 1 ]
|
||||
}
|
|
@ -0,0 +1,14 @@
|
|||
@test "checking sasl: doveadm auth test works with good password" {
|
||||
run docker exec mail /bin/sh -c "doveadm auth test -x service=smtp user2@otherdomain.tld mypassword | grep 'auth succeeded'"
|
||||
[ "$status" -eq 0 ]
|
||||
}
|
||||
|
||||
@test "checking sasl: doveadm auth test fails with bad password" {
|
||||
run docker exec mail /bin/sh -c "doveadm auth test -x service=smtp user2@otherdomain.tld BADPASSWORD | grep 'auth failed'"
|
||||
[ "$status" -eq 0 ]
|
||||
}
|
||||
|
||||
@test "checking sasl: sasl_passwd.db exists" {
|
||||
run docker exec mail [ -f /etc/postfix/sasl_passwd.db ]
|
||||
[ "$status" -eq 0 ]
|
||||
}
|
Loading…
Reference in New Issue