mirror of
https://github.com/docker-mailserver/docker-mailserver.git
synced 2024-01-19 02:48:50 +00:00
tests(chore): Use REPOSITORY_ROOT
export var from Makefile
Allows for using `load` with an absolute path instead of a relative one, which makes it possible to group tests into different directories. Parallel tests differ slightly, loading the newer `helper/common.bash` and `helper/setup.bash` files instead of the older `test_helper/common.bash` which serial tests continue to use.
This commit is contained in:
parent
2cd534a1ab
commit
835056d707
|
@ -1,7 +1,7 @@
|
|||
#!/bin/bash
|
||||
|
||||
load 'test_helper/bats-support/load'
|
||||
load 'test_helper/bats-assert/load'
|
||||
load "${REPOSITORY_ROOT}/test/test_helper/bats-support/load"
|
||||
load "${REPOSITORY_ROOT}/test/test_helper/bats-assert/load"
|
||||
|
||||
NAME=${NAME:-mailserver-testing:ci}
|
||||
|
||||
|
|
|
@ -1,6 +1,6 @@
|
|||
#!/bin/bash
|
||||
|
||||
load 'test_helper/common'
|
||||
load "${REPOSITORY_ROOT}/test/test_helper/common"
|
||||
|
||||
# Helper methods for testing TLS.
|
||||
# `_should_*` methods are useful for common high-level functionality.
|
||||
|
|
|
@ -1,4 +1,5 @@
|
|||
load 'test_helper/common'
|
||||
load "${REPOSITORY_ROOT}/test/helper/setup"
|
||||
load "${REPOSITORY_ROOT}/test/helper/common"
|
||||
|
||||
TEST_NAME_PREFIX='ClamAV:'
|
||||
CONTAINER_NAME='dms-test-clamav'
|
||||
|
|
|
@ -1,4 +1,5 @@
|
|||
load 'test_helper/common'
|
||||
load "${REPOSITORY_ROOT}/test/helper/setup"
|
||||
load "${REPOSITORY_ROOT}/test/helper/common"
|
||||
|
||||
function setup() {
|
||||
local PRIVATE_CONFIG
|
||||
|
|
|
@ -1,6 +1,5 @@
|
|||
load 'test_helper/common'
|
||||
# Globals referenced from `test_helper/common`:
|
||||
# TEST_NAME
|
||||
load "${REPOSITORY_ROOT}/test/helper/setup"
|
||||
load "${REPOSITORY_ROOT}/test/helper/common"
|
||||
|
||||
# Can run tests in parallel?: No
|
||||
# Shared static container name: TEST_NAME
|
||||
|
|
|
@ -1,4 +1,5 @@
|
|||
load 'test_helper/common'
|
||||
load "${REPOSITORY_ROOT}/test/helper/setup"
|
||||
load "${REPOSITORY_ROOT}/test/helper/common"
|
||||
|
||||
function setup_file() {
|
||||
local PRIVATE_CONFIG
|
||||
|
|
|
@ -1,4 +1,5 @@
|
|||
load 'test_helper/common'
|
||||
load "${REPOSITORY_ROOT}/test/helper/setup"
|
||||
load "${REPOSITORY_ROOT}/test/helper/common"
|
||||
|
||||
function setup_file() {
|
||||
local PRIVATE_CONFIG
|
||||
|
|
|
@ -1,4 +1,4 @@
|
|||
load 'test_helper/common'
|
||||
load "${REPOSITORY_ROOT}/test/test_helper/common"
|
||||
|
||||
# Note if tests fail asserting against `supervisorctl tail changedetector` output,
|
||||
# use `supervisorctl tail -<num bytes> changedetector` instead to increase log output.
|
||||
|
|
|
@ -1,4 +1,4 @@
|
|||
load 'test_helper/common'
|
||||
load "${REPOSITORY_ROOT}/test/test_helper/common"
|
||||
|
||||
setup_file() {
|
||||
local PRIVATE_CONFIG
|
||||
|
|
|
@ -1,4 +1,4 @@
|
|||
load 'test_helper/common'
|
||||
load "${REPOSITORY_ROOT}/test/test_helper/common"
|
||||
|
||||
CONTAINER="mail_dnsbl_enabled"
|
||||
CONTAINER2="mail_dnsbl_disabled"
|
||||
|
|
|
@ -1,4 +1,4 @@
|
|||
load 'test_helper/common'
|
||||
load "${REPOSITORY_ROOT}/test/test_helper/common"
|
||||
|
||||
function setup_file() {
|
||||
local PRIVATE_CONFIG
|
||||
|
|
|
@ -1,4 +1,4 @@
|
|||
load 'test_helper/common'
|
||||
load "${REPOSITORY_ROOT}/test/test_helper/common"
|
||||
|
||||
function setup_file() {
|
||||
local PRIVATE_CONFIG
|
||||
|
|
|
@ -1,4 +1,4 @@
|
|||
load 'test_helper/common'
|
||||
load "${REPOSITORY_ROOT}/test/test_helper/common"
|
||||
|
||||
function setup_file() {
|
||||
local PRIVATE_CONFIG
|
||||
|
|
|
@ -1,4 +1,4 @@
|
|||
load 'test_helper/common'
|
||||
load "${REPOSITORY_ROOT}/test/test_helper/common"
|
||||
|
||||
|
||||
function setup_file() {
|
||||
|
|
|
@ -1,4 +1,4 @@
|
|||
load 'test_helper/common'
|
||||
load "${REPOSITORY_ROOT}/test/test_helper/common"
|
||||
|
||||
setup_file() {
|
||||
local PRIVATE_CONFIG PRIVATE_ETC
|
||||
|
|
|
@ -1,4 +1,4 @@
|
|||
load 'test_helper/common'
|
||||
load "${REPOSITORY_ROOT}/test/test_helper/common"
|
||||
|
||||
function setup_file() {
|
||||
local PRIVATE_CONFIG
|
||||
|
|
|
@ -1,4 +1,4 @@
|
|||
load 'test_helper/common'
|
||||
load "${REPOSITORY_ROOT}/test/test_helper/common"
|
||||
|
||||
# Test case
|
||||
# ---------
|
||||
|
|
|
@ -1,4 +1,4 @@
|
|||
load 'test_helper/common'
|
||||
load "${REPOSITORY_ROOT}/test/test_helper/common"
|
||||
|
||||
setup() {
|
||||
# Getting mail container IP
|
||||
|
|
|
@ -1,4 +1,4 @@
|
|||
load 'test_helper/common'
|
||||
load "${REPOSITORY_ROOT}/test/test_helper/common"
|
||||
|
||||
function setup_file() {
|
||||
local PRIVATE_CONFIG
|
||||
|
|
|
@ -1,4 +1,4 @@
|
|||
load 'test_helper/common'
|
||||
load "${REPOSITORY_ROOT}/test/test_helper/common"
|
||||
|
||||
# Test case
|
||||
# ---------
|
||||
|
|
|
@ -1,4 +1,4 @@
|
|||
load 'test_helper/common'
|
||||
load "${REPOSITORY_ROOT}/test/test_helper/common"
|
||||
|
||||
function setup_file() {
|
||||
docker run --rm -d --name mail_smtponly \
|
||||
|
|
|
@ -1,4 +1,4 @@
|
|||
load 'test_helper/common'
|
||||
load "${REPOSITORY_ROOT}/test/test_helper/common"
|
||||
|
||||
# Test case
|
||||
# ---------
|
||||
|
|
|
@ -1,4 +1,4 @@
|
|||
load 'test_helper/common'
|
||||
load "${REPOSITORY_ROOT}/test/test_helper/common"
|
||||
|
||||
setup_file() {
|
||||
local PRIVATE_CONFIG
|
||||
|
|
|
@ -1,5 +1,5 @@
|
|||
load 'test_helper/common'
|
||||
load 'test_helper/tls'
|
||||
load "${REPOSITORY_ROOT}/test/test_helper/common"
|
||||
load "${REPOSITORY_ROOT}/test/test_helper/tls"
|
||||
|
||||
# Globals referenced from `test_helper/common`:
|
||||
# TEST_NAME TEST_FQDN TEST_TMP_CONFIG
|
||||
|
|
|
@ -1,5 +1,5 @@
|
|||
#!/usr/bin/env bats
|
||||
load 'test_helper/common'
|
||||
load "${REPOSITORY_ROOT}/test/test_helper/common"
|
||||
|
||||
function setup_file() {
|
||||
# Internal copies made by `start-mailserver.sh`:
|
||||
|
|
|
@ -1,4 +1,4 @@
|
|||
load 'test_helper/common'
|
||||
load "${REPOSITORY_ROOT}/test/test_helper/common"
|
||||
|
||||
setup_file() {
|
||||
local PRIVATE_CONFIG
|
||||
|
|
|
@ -1,4 +1,4 @@
|
|||
load 'test_helper/common'
|
||||
load "${REPOSITORY_ROOT}/test/test_helper/common"
|
||||
|
||||
# Test case
|
||||
# ---------
|
||||
|
|
|
@ -1,4 +1,4 @@
|
|||
load 'test_helper/common'
|
||||
load "${REPOSITORY_ROOT}/test/test_helper/common"
|
||||
|
||||
function setup() {
|
||||
local PRIVATE_CONFIG
|
||||
|
|
|
@ -1,4 +1,4 @@
|
|||
load 'test_helper/common'
|
||||
load "${REPOSITORY_ROOT}/test/test_helper/common"
|
||||
|
||||
setup_file() {
|
||||
local PRIVATE_CONFIG
|
||||
|
|
|
@ -1,4 +1,4 @@
|
|||
load 'test_helper/common'
|
||||
load "${REPOSITORY_ROOT}/test/test_helper/common"
|
||||
|
||||
function setup_file() {
|
||||
pushd test/docker-openldap/ || return 1
|
||||
|
|
|
@ -1,4 +1,4 @@
|
|||
load 'test_helper/common'
|
||||
load "${REPOSITORY_ROOT}/test/test_helper/common"
|
||||
|
||||
setup_file() {
|
||||
local PRIVATE_CONFIG
|
||||
|
|
|
@ -1,4 +1,4 @@
|
|||
load 'test_helper/common'
|
||||
load "${REPOSITORY_ROOT}/test/test_helper/common"
|
||||
|
||||
function setup_file() {
|
||||
local PRIVATE_CONFIG
|
||||
|
|
|
@ -1,4 +1,4 @@
|
|||
load 'test_helper/common'
|
||||
load "${REPOSITORY_ROOT}/test/test_helper/common"
|
||||
|
||||
function setup() {
|
||||
local PRIVATE_CONFIG
|
||||
|
|
|
@ -1,4 +1,4 @@
|
|||
load 'test_helper/common'
|
||||
load "${REPOSITORY_ROOT}/test/test_helper/common"
|
||||
|
||||
function setup_file() {
|
||||
# We use a temporary config directory since we'll be dynamically editing
|
||||
|
|
|
@ -1,4 +1,4 @@
|
|||
load 'test_helper/common'
|
||||
load "${REPOSITORY_ROOT}/test/test_helper/common"
|
||||
|
||||
setup_file() {
|
||||
local PRIVATE_CONFIG
|
||||
|
|
|
@ -1,4 +1,4 @@
|
|||
load 'test_helper/common'
|
||||
load "${REPOSITORY_ROOT}/test/test_helper/common"
|
||||
|
||||
function setup_file() {
|
||||
# Fail early if the test image is already running:
|
||||
|
|
|
@ -1,4 +1,4 @@
|
|||
load 'test_helper/common'
|
||||
load "${REPOSITORY_ROOT}/test/test_helper/common"
|
||||
|
||||
export IMAGE_NAME CONTAINER_NAME TEST_FILE
|
||||
|
||||
|
|
|
@ -1,4 +1,4 @@
|
|||
load 'test_helper/common'
|
||||
load "${REPOSITORY_ROOT}/test/test_helper/common"
|
||||
|
||||
NON_DEFAULT_DOCKER_MAIL_NETWORK_NAME=non-default-docker-mail-network
|
||||
setup_file() {
|
||||
|
|
|
@ -1,5 +1,5 @@
|
|||
#!/usr/bin/env bats
|
||||
load 'test_helper/common'
|
||||
load "${REPOSITORY_ROOT}/test/test_helper/common"
|
||||
# Globals ${BATS_TMPDIR} and ${NAME}
|
||||
# `${NAME}` defaults to `mailserver-testing:ci`
|
||||
|
||||
|
|
|
@ -1,4 +1,4 @@
|
|||
load 'test_helper/common'
|
||||
load "${REPOSITORY_ROOT}/test/test_helper/common"
|
||||
|
||||
CONTAINER='sedfile'
|
||||
TEST_FILE='/tmp/sedfile-test.txt'
|
||||
|
|
|
@ -1,4 +1,4 @@
|
|||
load 'test_helper/common'
|
||||
load "${REPOSITORY_ROOT}/test/test_helper/common"
|
||||
|
||||
# Globals referenced from `test_helper/common`:
|
||||
# TEST_NAME (should match the filename, minus the bats extension)
|
||||
|
|
|
@ -1,6 +1,4 @@
|
|||
load 'test_helper/bats-support/load'
|
||||
load 'test_helper/bats-assert/load'
|
||||
load 'test_helper/common'
|
||||
load "${REPOSITORY_ROOT}/test/test_helper/common"
|
||||
|
||||
@test "repeat_until_success_or_timeout returns instantly on success" {
|
||||
SECONDS=0
|
||||
|
|
|
@ -1,4 +1,4 @@
|
|||
load 'test_helper/common'
|
||||
load "${REPOSITORY_ROOT}/test/test_helper/common"
|
||||
|
||||
setup_file() {
|
||||
local PRIVATE_CONFIG
|
||||
|
|
Loading…
Reference in a new issue