mirror of
https://github.com/docker-mailserver/docker-mailserver.git
synced 2025-08-04 10:05:00 +02:00
tests: Adjust parallel tests
- The usual serial to parallel test conversion to utilize the `setup.bash` common setup structure, and adding a `TEST_PREFIX` var for each test case to leverage. - Standardize on parallel test naming conventions for variables / values. - More consistent use of `bash -c` instead of `/bin/bash -c` or `/bin/sh -c`. - Using the `_run_in_container` helper instead of `run docker exec ${CONTAINER_NAME}`. - Updates tests to use the `check_if_process_is_running` helper. --- chore: Revise inline docs for the `ssl_letsencrypt` test - Moves the override to be in closer proximity to the `initial_setup` call, and better communicates the intent to override. - Removes top comment block that is no longer providing value or correct information to maintainers. - Revised `acme.json` test case inline doc comments.
This commit is contained in:
parent
306592fcad
commit
2ec6c4abc0
17 changed files with 623 additions and 591 deletions
|
@ -2,7 +2,7 @@ load "${REPOSITORY_ROOT}/test/helper/setup"
|
|||
load "${REPOSITORY_ROOT}/test/helper/common"
|
||||
|
||||
TEST_NAME_PREFIX='ClamAV:'
|
||||
CONTAINER_NAME='dms-test-clamav'
|
||||
CONTAINER_NAME='dms-test_clamav'
|
||||
|
||||
function setup_file() {
|
||||
init_with_defaults
|
||||
|
@ -35,7 +35,7 @@ function setup_file() {
|
|||
function teardown_file() { _default_teardown ; }
|
||||
|
||||
@test "${TEST_NAME_PREFIX} process clamd is running" {
|
||||
_run_in_container bash -c "ps aux --forest | grep -v grep | grep '/usr/sbin/clamd'"
|
||||
run check_if_process_is_running 'clamd'
|
||||
assert_success
|
||||
}
|
||||
|
||||
|
@ -66,6 +66,8 @@ function teardown_file() { _default_teardown ; }
|
|||
}
|
||||
|
||||
@test "${TEST_NAME_PREFIX} process clamd restarts when killed" {
|
||||
_run_in_container bash -c "pkill clamd && sleep 10 && ps aux --forest | grep -v grep | grep '/usr/sbin/clamd'"
|
||||
_run_in_container pkill 'clamd'
|
||||
assert_success
|
||||
|
||||
run_until_success_or_timeout 10 check_if_process_is_running 'clamd'
|
||||
}
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue