mirror of
https://github.com/docker-mailserver/docker-mailserver.git
synced 2025-08-04 01:55:29 +02:00
tests: Use swaks
instead of nc
for sending mail (#3732)
See associated `CHANGELOG.md` entry for details. --------- Co-authored-by: Brennan Kinney <5098581+polarathene@users.noreply.github.com>
This commit is contained in:
parent
0889b0ff06
commit
9e81517fe3
119 changed files with 355 additions and 455 deletions
|
@ -73,8 +73,17 @@ function teardown_file() {
|
|||
@test "ban ip on multiple failed login" {
|
||||
CONTAINER1_IP=$(_get_container_ip "${CONTAINER1_NAME}")
|
||||
# Trigger a ban by failing to login twice:
|
||||
CONTAINER_NAME=${CONTAINER2_NAME} _send_email 'auth/smtp-auth-login-wrong' "${CONTAINER1_IP} 465"
|
||||
CONTAINER_NAME=${CONTAINER2_NAME} _send_email 'auth/smtp-auth-login-wrong' "${CONTAINER1_IP} 465"
|
||||
for _ in {1..2}; do
|
||||
CONTAINER_NAME=${CONTAINER2_NAME} _send_email \
|
||||
--server "${CONTAINER1_IP}" \
|
||||
--port 465 \
|
||||
--auth PLAIN \
|
||||
--auth-user user1@localhost.localdomain \
|
||||
--auth-password wrongpassword
|
||||
assert_failure
|
||||
assert_output --partial 'authentication failed'
|
||||
assert_output --partial 'No authentication type succeeded'
|
||||
done
|
||||
|
||||
# Checking that CONTAINER2_IP is banned in "${CONTAINER1_NAME}"
|
||||
CONTAINER2_IP=$(_get_container_ip "${CONTAINER2_NAME}")
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue