Refactored.
This commit is contained in:
parent
5dd25f7868
commit
ff8ca5b5b7
|
@ -1,19 +1,18 @@
|
||||||
@test "checking pop: server is ready" {
|
@test "checking pop: ENABLE_POP3=1 => server is running" {
|
||||||
|
if [ "$ENABLE_POP3" != 1 ]; then
|
||||||
|
skip
|
||||||
|
fi
|
||||||
|
|
||||||
run docker exec mail /bin/bash -c "nc -w 1 0.0.0.0 110 | grep '+OK'"
|
run docker exec mail /bin/bash -c "nc -w 1 0.0.0.0 110 | grep '+OK'"
|
||||||
|
|
||||||
if [ "$ENABLE_POP" -eq 1 ]; then
|
|
||||||
[ "$status" -eq 0 ]
|
[ "$status" -eq 0 ]
|
||||||
else
|
}
|
||||||
[ "$status" -eq 1 ]
|
|
||||||
fi
|
|
||||||
}
|
@test "checking pop: ENABLE_POP3=1 => authentication works" {
|
||||||
|
if [ "$ENABLE_POP3" != 1 ]; then
|
||||||
|
skip
|
||||||
|
fi
|
||||||
|
|
||||||
@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"
|
run docker exec mail /bin/sh -c "nc -w 1 0.0.0.0 110 < /tmp/docker-mailserver-test/auth/pop3-auth.txt"
|
||||||
|
|
||||||
if [ "$ENABLE_POP" -eq 1 ]; then
|
|
||||||
[ "$status" -eq 0 ]
|
[ "$status" -eq 0 ]
|
||||||
else
|
|
||||||
[ "$status" -eq 1 ]
|
|
||||||
fi
|
|
||||||
}
|
}
|
||||||
|
|
Loading…
Reference in New Issue