tests: Use mail.example.test as common container hostname (#2975)

This commit is contained in:
Brennan Kinney 2023-01-05 04:24:08 +13:00 committed by GitHub
parent b7bad82e07
commit 304747fad9
No known key found for this signature in database
GPG key ID: 4AEE18F83AFDEB23
2 changed files with 2 additions and 2 deletions

View file

@ -110,7 +110,7 @@ function common_container_create() {
run docker create \ run docker create \
--tty \ --tty \
--name "${CONTAINER_NAME}" \ --name "${CONTAINER_NAME}" \
--hostname "${TEST_FQDN:-mail.my-domain.com}" \ --hostname "${TEST_FQDN:-mail.example.test}" \
--volume "${TEST_FILES_VOLUME}" \ --volume "${TEST_FILES_VOLUME}" \
--volume "${TEST_CONFIG_VOLUME}" \ --volume "${TEST_CONFIG_VOLUME}" \
--env ENABLE_AMAVIS=0 \ --env ENABLE_AMAVIS=0 \

View file

@ -86,7 +86,7 @@ TEST_NAME_PREFIX='test helper functions:'
# NOTE: Test requires external network access available # NOTE: Test requires external network access available
@test "${TEST_NAME_PREFIX} wait_for_smtp_port_in_container returns immediately when port found" { @test "${TEST_NAME_PREFIX} wait_for_smtp_port_in_container returns immediately when port found" {
local CONTAINER_NAME local CONTAINER_NAME
CONTAINER_NAME=$(docker run --rm -d alpine sh -c "sleep 10") CONTAINER_NAME=$(docker run --rm -d alpine sh -c "sleep 100")
docker exec "${CONTAINER_NAME}" apk add netcat-openbsd docker exec "${CONTAINER_NAME}" apk add netcat-openbsd
docker exec "${CONTAINER_NAME}" nc -l 25 & docker exec "${CONTAINER_NAME}" nc -l 25 &