1
0
mirror of https://github.com/tomav/docker-mailserver.git synced 2024-07-04 23:21:23 +02:00
docker-mailserver/test/tests/serial/mail_time.bats
Georg Lauterbach 59127e2b25 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.
2022-11-26 14:52:42 +13:00

30 lines
697 B
Bash

load 'test_helper/common'
setup_file() {
local PRIVATE_CONFIG
PRIVATE_CONFIG=$(duplicate_config_for_container .)
docker run -d --name mail_time \
-v "${PRIVATE_CONFIG}":/tmp/docker-mailserver \
-v "$(pwd)/test/test-files":/tmp/docker-mailserver-test:ro \
-e TZ='Asia/Jakarta' \
-e LOG_LEVEL=debug \
-h mail.my-domain.com -t "${NAME}"
wait_for_smtp_port_in_container mail_time
}
teardown_file() {
docker rm -f mail_time
}
@test "checking time: setting the time with TZ works correctly" {
run docker exec mail_time cat /etc/timezone
assert_success
assert_output 'Asia/Jakarta'
run docker exec mail_time date '+%Z'
assert_success
assert_output 'WIB'
}