mirror of
https://github.com/docker-mailserver/docker-mailserver.git
synced 2025-08-05 02:27:15 +02:00
tests(chore): Rename test files to serial and parallel types
- `test_helper.bats` needs more work than this PR provides to be compatible with parallel tests, so must remain as a serial test for now. - `spam_bounced.bats` had failures as a serial test, but works well converted to a parallel test in a future commit.
This commit is contained in:
parent
2bc4078e35
commit
59127e2b25
41 changed files with 0 additions and 0 deletions
51
test/tests/serial/mail_fetchmail.bats
Normal file
51
test/tests/serial/mail_fetchmail.bats
Normal file
|
@ -0,0 +1,51 @@
|
|||
load 'test_helper/common'
|
||||
|
||||
function setup_file() {
|
||||
local PRIVATE_CONFIG
|
||||
PRIVATE_CONFIG=$(duplicate_config_for_container .)
|
||||
|
||||
docker run -d --name mail_fetchmail \
|
||||
-v "${PRIVATE_CONFIG}":/tmp/docker-mailserver \
|
||||
-v "$(pwd)/test/test-files":/tmp/docker-mailserver-test:ro \
|
||||
-e ENABLE_FETCHMAIL=1 \
|
||||
--cap-add=NET_ADMIN \
|
||||
-h mail.my-domain.com -t "${NAME}"
|
||||
|
||||
wait_for_finished_setup_in_container mail_fetchmail
|
||||
}
|
||||
|
||||
function teardown_file() {
|
||||
docker rm -f mail_fetchmail
|
||||
}
|
||||
|
||||
#
|
||||
# processes
|
||||
#
|
||||
|
||||
@test "checking process: fetchmail (fetchmail server enabled)" {
|
||||
run docker exec mail_fetchmail /bin/bash -c "ps aux --forest | grep -v grep | grep '/usr/bin/fetchmail'"
|
||||
assert_success
|
||||
}
|
||||
|
||||
#
|
||||
# fetchmail
|
||||
#
|
||||
|
||||
@test "checking fetchmail: gerneral options in fetchmailrc are loaded" {
|
||||
run docker exec mail_fetchmail grep 'set syslog' /etc/fetchmailrc
|
||||
assert_success
|
||||
}
|
||||
|
||||
@test "checking fetchmail: fetchmail.cf is loaded" {
|
||||
run docker exec mail_fetchmail grep 'pop3.example.com' /etc/fetchmailrc
|
||||
assert_success
|
||||
}
|
||||
|
||||
#
|
||||
# supervisor
|
||||
#
|
||||
|
||||
@test "checking restart of process: fetchmail" {
|
||||
run docker exec mail_fetchmail /bin/bash -c "pkill fetchmail && sleep 10 && ps aux --forest | grep -v grep | grep '/usr/bin/fetchmail'"
|
||||
assert_success
|
||||
}
|
Loading…
Add table
Add a link
Reference in a new issue