Refactored.

This commit is contained in:
Thomas VIAL 2016-08-15 21:58:31 +02:00
parent 9048050b30
commit 7c33cfa6f5
No known key found for this signature in database
GPG Key ID: 0394CEE552FAFEFC
2 changed files with 16 additions and 1 deletions

View File

@ -62,4 +62,4 @@ endif
clean:
# Remove running test container
docker rm -f mail
docker rm -f mail

15
test/ENABLE_POP3.bats Normal file
View File

@ -0,0 +1,15 @@
@test "checking pop: server is ready" {
if [ $ENABLE_POP != 1 ]; then
skip
fi
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" {
if [ $ENABLE_POP != 1 ]; then
skip
fi
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 ]
}