mirror of
https://github.com/docker-mailserver/docker-mailserver.git
synced 2025-08-04 18:15:29 +02:00
ci: move tests than can be run in parallel now (#3038)
This commit is contained in:
parent
66f3bbc062
commit
e6dee0f2f1
22 changed files with 2 additions and 1 deletions
44
test/tests/parallel/set3/mta/smtponly.bats
Normal file
44
test/tests/parallel/set3/mta/smtponly.bats
Normal file
|
@ -0,0 +1,44 @@
|
|||
load "${REPOSITORY_ROOT}/test/helper/common"
|
||||
load "${REPOSITORY_ROOT}/test/helper/setup"
|
||||
|
||||
BATS_TEST_NAME_PREFIX='[SMTP-Only] '
|
||||
CONTAINER_NAME='dms-test_env-smtp-only'
|
||||
|
||||
function setup_file() {
|
||||
_init_with_defaults
|
||||
|
||||
local CUSTOM_SETUP_ARGUMENTS=(
|
||||
--env SMTP_ONLY=1
|
||||
--env PERMIT_DOCKER=network
|
||||
)
|
||||
|
||||
_common_container_setup 'CUSTOM_SETUP_ARGUMENTS'
|
||||
|
||||
_wait_for_smtp_port_in_container
|
||||
}
|
||||
|
||||
function teardown_file() { _default_teardown ; }
|
||||
|
||||
@test "Dovecot quota absent in postconf" {
|
||||
_run_in_container postconf
|
||||
assert_success
|
||||
refute_output --partial "check_policy_service inet:localhost:65265'"
|
||||
}
|
||||
|
||||
# TODO: needs complete rework when proper DNS container is running for tests
|
||||
@test "sending mail should work" {
|
||||
skip 'TODO: This test is absolutely broken and needs reworking!'
|
||||
|
||||
assert_success
|
||||
|
||||
|
||||
# it looks as if someone tries to send mail to another domain outside of DMS
|
||||
_run_in_container_bash "nc 0.0.0.0 25 < /tmp/docker-mailserver-test/email-templates/smtp-only.txt"
|
||||
assert_success
|
||||
_wait_for_empty_mail_queue_in_container
|
||||
|
||||
# this seemingly succeeds, but looking at the logs, it doesn't
|
||||
_run_in_container_bash 'grep -cE "to=<user2\@external.tld>.*status\=sent" /var/log/mail/mail.log'
|
||||
# this is absolutely useless! `grep -c` count 0 but also returns 0; the mail was never properly sent!
|
||||
[[ ${status} -ge 0 ]]
|
||||
}
|
Loading…
Add table
Add a link
Reference in a new issue