2019-08-08 22:42:37 +00:00
|
|
|
load 'test_helper/common'
|
|
|
|
|
|
|
|
function setup() {
|
2022-05-30 00:53:30 +00:00
|
|
|
local PRIVATE_CONFIG
|
|
|
|
PRIVATE_CONFIG=$(duplicate_config_for_container .)
|
|
|
|
|
|
|
|
CONTAINER=$(docker run -d \
|
|
|
|
-v "${PRIVATE_CONFIG}":/tmp/docker-mailserver \
|
|
|
|
-v "$(pwd)/test/test-files":/tmp/docker-mailserver-test:ro \
|
|
|
|
-h mail.my-domain.com -t "${NAME}")
|
|
|
|
|
|
|
|
# using postfix availability as start indicator, this might be insufficient for postgrey
|
|
|
|
wait_for_smtp_port_in_container "${CONTAINER}"
|
2019-08-08 22:42:37 +00:00
|
|
|
}
|
|
|
|
|
|
|
|
function teardown() {
|
2022-05-30 00:53:30 +00:00
|
|
|
docker rm -f "${CONTAINER}"
|
2019-08-08 22:42:37 +00:00
|
|
|
}
|
|
|
|
|
|
|
|
@test "checking process: postgrey (disabled in default configuration)" {
|
2020-11-05 12:32:42 +00:00
|
|
|
run docker exec "${CONTAINER}" /bin/bash -c "ps aux --forest | grep -v grep | grep 'postgrey'"
|
2019-08-08 22:42:37 +00:00
|
|
|
assert_failure
|
2020-10-19 11:13:42 +00:00
|
|
|
}
|